This paper proposes an end-to-end optical camera communications (OCC) system using an autoencoder neural network trained to recover the transmitted symbols. Although OCC techniques have been extensively studied in the literature, using an autoencoder that learns the transmitter and receiver functions jointly is a novel concept with significant prospects. Furthermore, we investigate the performance impact caused by the overlooked optical-to-electrical (O2E) conversion process of real-world OCC receivers. The autoencoder learning model captures these typically undesired changes in image sensors for the design of constellation symbols and reception schemes. For the simulation, we constructed an end-to-end autoencoder for a color space-based OCC system and measured the O2E performance effect. The proposed autoencoder communication system is analyzed and compared using the symbol error rate (SER) across various OCC detection systems. Despite the subtle spectral responsivity variations in image sensors, our numerical results indicate that the autoencoder model can learn to recover the transmitted data while minimizing SER and meeting the lighting requirements. These findings may interest a broad range of applications, particularly in IoT sensor networks. Among all the image sensors we studied, the OCC system with Bayer CFA-based signal detection showed superior performance.