Visual perception has profound effects on human decision-making and emotional responses. Replicating the functions of the human visual system through device development has been a constant pursuit in recent years. However, to fully simulate the various functions of the human visual system, it is often necessary to integrate multiple devices with different functions, resulting in complex, large-volume device structures and increased power consumption. Here, an optoelectronic transistor with comprehensive visual functions is introduced. By coupling diverse photoreceptive properties of the channel and electrical regulation through charge injection/ferroelectric switching from the hafnium-based gate, the devices can simulate functions of both photoreceptors in the retina and synapses in the visual cortex. A device array is constructed to confirm the perceptual functions of cone and rod cells. Subsequently, color discrimination and recognition for color images are achieved by combining the tunable perception and synapse functions. Then an intelligent traffic judgment system with this all-in-one device is developed, which is capable of making judgments and decisions regarding traffic signals and pedestrian movements. This work provides a potential solution for developing compact and efficient devices for the next-generation bio-inspired visual system.