Hello @joelhoro
Here's the source code of "M5CamColorRecognition" for M5Camera (A Model). You can change the pin map for your ESP32CAM.
https://github.com/m5stack/Applications-cam
Factory firmware:
https://github.com/m5stack/m5stack-cam-psram/tree/NoPsram