mborgerson
Well-known member
In a thread on the technical support forum https://forum.pjrc.com/threads/63195-Problem-trying-to-read-OV7670-camera-under-IRQ-Teensy-4-0
I've been working with the OV7670 camera and a number of different hardware implementations with the OP, Cyrille, and the usual list of suspects. I've decided that it is time to convert a lot of our work to a library and I have a few questions:
1. Should I work on a generic library that can handle multiple different cameras, or concentrate on the OV7670, which is not only cheap ($5 per unit on Amazon), but pretty capable (VGA resolution at 30FPS)?
2. Should I follow the example of the Hardware Serial libraries and have the library just instantiate a single CSI_Camera object or should the library be more like the IntervalTimer and allow multiple instantiations? There is a strong argument for the former in that the T4.1 has only one CSI interface and there is no simple way to connect multiple cameras. That also makes it simpler to handle interrupt routines, which can get tricky with multiple objects.
3. How does the library handle the fact that a VGA RGB565 image is about 614400 bytes and can only be easily captured using the PSRAM in EXTMEM? Smaller images, like QVGA (320x240) can be captured in the T4.1 DMAMEM, but how should the object check for frame buffer memory size?
4. How will the class handle various output formats: Frame buffer sent to Serial for upload to PC, Frame Buffer written to SD card, Frame buffer windowed to transfer to a connected LCD display?
This object will only be available on the T4.1, as it is the only Teensy that has the CSI pins led to user-available pins.
The easy way out would be to write a library that only handles the OV7670 with a limited number of output formats. I may start that way, but I don't want to paint myself into a corner when there are lots of other camera module that may work with the T4.1 CSI.
I've been working with the OV7670 camera and a number of different hardware implementations with the OP, Cyrille, and the usual list of suspects. I've decided that it is time to convert a lot of our work to a library and I have a few questions:
1. Should I work on a generic library that can handle multiple different cameras, or concentrate on the OV7670, which is not only cheap ($5 per unit on Amazon), but pretty capable (VGA resolution at 30FPS)?
2. Should I follow the example of the Hardware Serial libraries and have the library just instantiate a single CSI_Camera object or should the library be more like the IntervalTimer and allow multiple instantiations? There is a strong argument for the former in that the T4.1 has only one CSI interface and there is no simple way to connect multiple cameras. That also makes it simpler to handle interrupt routines, which can get tricky with multiple objects.
3. How does the library handle the fact that a VGA RGB565 image is about 614400 bytes and can only be easily captured using the PSRAM in EXTMEM? Smaller images, like QVGA (320x240) can be captured in the T4.1 DMAMEM, but how should the object check for frame buffer memory size?
4. How will the class handle various output formats: Frame buffer sent to Serial for upload to PC, Frame Buffer written to SD card, Frame buffer windowed to transfer to a connected LCD display?
This object will only be available on the T4.1, as it is the only Teensy that has the CSI pins led to user-available pins.
The easy way out would be to write a library that only handles the OV7670 with a limited number of output formats. I may start that way, but I don't want to paint myself into a corner when there are lots of other camera module that may work with the T4.1 CSI.