The heterojunction interface plays a critical role in defining the physical properties that significantly influence the performance of self-powered photodetectors (PDs). By integrating piezoelectric and pyroelectric polarization effects, the interface band structure can be significantly modulated, optimizing the dynamics of photo-generated carriers. Here, we developed a self-powered PD utilizing a high-quality, flexible CdS/pyramid-Si heterojunction. The PD demonstrates an impressive wide-band response spectrum from 405 to 1064 nm, achieving a responsivity (R) of 0.37 A/W at zero bias, attributed to its exceptional photovoltaic response. The pyroelectric effect in the CdS layer significantly accelerates carrier separation at the interface, increasing the R to 2.56 A/W, representing a 591.9 % enhancement. Additionally, a remarkably fast response time of 86.4/96.3 mu s is attained. Leveraging the unique modulation mechanism of the pyroelectric effect, a novel imaging system capable of dual imaging, reflecting both photovoltaic and pyroelectric responses, is proposed, thereby enhancing imaging quality and facilitating wavelength resolution. Furthermore, applying external pressure introduces a piezoelectric effect that optimizes the band alignment, modulating both the photovoltaic and pyroelectric effects. By combining these effects, the highest R of 3.16 A/W is achieved, reflecting a remarkable 754 % increase. Moreover, the piezoelectric effect further enhances imaging brightness and color resolution. This research highlights the significant potential of the pyroelectric and piezoelectric effects in enhancing the photoelectric response of CdS/Si heterojunction PDs and promotes their applications in high-performance wavelength-resolved optical imaging.