I'm working with an arduino nano and an OV7670 camera without a FIFO chip, I managed to capture an image and save it on my PC as an .bmp file, but can I capture an image and view it without saving it on my PC? I need to capture an image and read its pixels colors, and after that, capture another image and reading its pixels colors.
I'm not sure about what you mean by
can I capture an image and view it without saving it on my PC
your OV7670 offers a resolution of 640x480, even with a pixel represented on one byte, that's 300 kilobytes... your arduino nano has 2 kilobytes in total of memory... so doing anything in RAM to "read its pixels colors" might be a challenge if you need the whole image to perform the analysis.
AFAIK you can define area of capture which is smaller, don't have to go full blast
Sure. Send the image byte by byte to some suitable display.
Do you mean to make some analysis of the different colours of the pixels in the image, without caring about where those pixels are?
You don't need to store the whole image in memory to do that. You can read the image one pixel at a time and make running totals of the number of pixels you see with each different colour.
But you could still easily run out of memory on a Nano. In most images, each pixel is represented by 24 bits, and that means a lot of possible colours. More than a Nano can count.
You could reduce those 24 bit pixels down to, say, 9 or 10 bits. Then a Nano might have enough memory to count the number of pixels with each possible 9- bit colour.
It would really help to know what would be done with the data from the images.
It would help to know as well the format of the image you get. Row bytes or a compressed JPEG that would need to be decompressed before you can actually work on the pixels…
I need to read its pixels colors to find 8 pixels that I want to know their position, I can't read the pixels one at a time, currently I'm planning to capture an image(with lower resolution then 640x480), save it as .bmp in a micro sd card and then read its pixels, but I don't know if its the best approach
you won't have more memory available when reading from the SD card than from the camera. The only thing you gain from the SD card is that it's easy to seek a byte somewhere in the file and go back and forth. expect this to be very slow...
but may be your algorithm can work straight from a flow of data and then you don't need the SD and it would be then faster.
How will you recognize the 8 pixels? a light in a dark pattern? (2x4 rectangle to recognize somewhere?)
The image is going to be with 2 main colors, for simplicity lets say the background is going to be white and in the middle a black circle, I want to find the ending points of the circle(between the black and white) in the X and Y. And another 4 pixels which are hard to explain.
If the contrast is high and consistant you could possibly detect this when just getting the pixel stream and being a bit smart about handling lines / columns
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.