To facilitate the development of efficient neuromorphic perception and computation, it is crucial to explore optoelectronic synaptic devices that integrate perceptual and computational capabilities. Various materials such as oxide semiconductors, conjugated organic polymers, transition metal sulfides, perovskite materials, and metal nanoparticles, along with their composites, are utilized in constructing these devices. However, optoelectronic synaptic devices based on 2D covalent organic frameworks (COFs) is rarely reported. In this study, an anthracene-based 2D COF (COF-DaTp) film is prepared using a room-temperature interface-confined strategy and utilized it as the active layer in an optoelectronic synaptic device with an Al/COF-DaTp/ITO configuration. The device demonstrated dual optoelectronic modulation, exhibiting significant optoelectronic resistive switching in response to light pulses, achieving 32 photoconductive states. Moreover, it exhibited history-dependent memristive behavior in voltage scans and electrical pulses, with a comparable diversity of 32 conductive states. The photodual-responsive properties of the COF-DaTp-based synaptic device enable it to simultaneously perform optical sensing and basic image denoising and recognition tasks, significantly enhancing recognition accuracy and reducing the number of training epochs compared to datasets without noise mitigation. This work opens the door for the application of 2D COF-based optoelectronic synaptic devices in visual computational processing.