Effectively handling massive information in complex lighting conditions is crucial for security-focused machine vision, as it relies on precise image feature detection and encryption/decryption to ensure integrity and confidentiality. Traditional hardware, primarily based on complementary metal-oxide-semiconductor (CMOS) technology, struggles with the complexity of processing tasks around the clock. To address this challenge, a ternary organic heterostructure visuomorphic phototransistor was tailored for adaptive critical image processing. The light coupling induced by the porous heterostructural layer enhances the light absorption efficiency by 2.5-fold. Our phototransistor exhibits bidirectional photoresponse across the visible and near-infrared (NIR) spectral regions, enabling adaptive edge detection in varying lighting conditions with precision above 85 %. The phototransistor array facilitates image encryption/decryption with a superior accuracy of 12 %/90 % compared to existing counterparts. This ternary organic hetero-integration combines multiple response modes, enabling compact and efficient critical feature processing.