Page 1 of 2

Camera

Posted: Thu Oct 06, 2016 1:20 pm
by a2retro
Hi does anyone at espressif have any recommendations for a Camera to be used with the esp32?

Re: Camera

Posted: Thu Oct 06, 2016 1:48 pm
by ESP_igrr
I did a proof-of-concept QR code scanning demo last month, and used OV7725 camera. Other OV7xxx series should work as well, with some changes to camera configuration code.
OV5xxx can work too, but it's advisable to choose the ones which support RGB or YUV 8-bit wide output bus. The ones which only output 10-bit raw data may be a bit harder to work with.
You will need XCLK, PCLK, HREF, VSYNC, SCK, SDA, D0-7 signals connected between the camera and ESP32.
Also choose the camera which can output a scaled down (QVGA or VGA) image. Use of larger frame buffers will require external SPI RAM.

We also do have a development board with camera connector in pipeline.

Re: Camera

Posted: Sat Nov 19, 2016 1:57 am
by ai-thinker sky
hi,I want to drive ov2640 with ESP32.I looked up your demo,but your demo control so many hardware register.So it's difficult to understand your demo.Can you open the source about ESP32 register datasheet.Or you can send the datasheet to my email: donny681@163.com. :D

Re: Camera

Posted: Sat Nov 19, 2016 2:00 am
by ai-thinker sky
ESP_igrr wrote:I did a proof-of-concept QR code scanning demo last month, and used OV7725 camera. Other OV7xxx series should work as well, with some changes to camera configuration code.
OV5xxx can work too, but it's advisable to choose the ones which support RGB or YUV 8-bit wide output bus. The ones which only output 10-bit raw data may be a bit harder to work with.
You will need XCLK, PCLK, HREF, VSYNC, SCK, SDA, D0-7 signals connected between the camera and ESP32.
Also choose the camera which can output a scaled down (QVGA or VGA) image. Use of larger frame buffers will require external SPI RAM.

We also do have a development board with camera connector in pipeline.
hi,I want to drive ov2640 with ESP32.I looked up your demo,but it control so many hardware registers.So it is difficult to understand your demo.Do you have a register datasheet?

Re: Camera

Posted: Sun Dec 04, 2016 12:03 pm
by ESP_krzychb
Hi ai-thinker sky,
hi,I want to drive ov2640 with ESP32.I looked up your demo,but it control so many hardware registers.So it is difficult to understand your demo.Do you have a register datasheet?
Please see registers for OV2640 in form as used in demo and the register datasheet.

The esp32-cam-demo has now readme file so it should be easier to start using it.

Re: Camera

Posted: Sat Jan 07, 2017 12:58 pm
by rudi ;-)
krzychb wrote:

The esp32-cam-demo has now readme file so it should be easier to start using it.
hi krzychb,
wRover Kit was designed for usually use QV7670, only a question, have you try the QV7670 with wRover Kit and perhabs you can provide the code snip for test using with QV7670, its only for a compare.

have you try to push the camera data frame to TFT live?
TFT and camera is fast enough to get nice frames.

i will try this next time with QV7670 .. and with OV7725. Some tips for me?

best wishes
rudi ;-)

Re: Camera

Posted: Sat Jan 07, 2017 1:43 pm
by erhardd
Hey rudi!
Nice to see you again. 8-)

I've begun porting the cam-app(idf) from krzychb to Arduino-IDE.
The steps are:
1. - init GLCD in 8-bit mode and prepare to output to(in my case-ILI9325) reg-r22;
2. -start the XCLK-Output;
3. -begin preview by cont. write to reg.r22;

krzychb is writing to framebuffer. For further filtering to serial output.
This is not neccessary for preview-only.
Look at the beginning(outcommented) at(under Programm-Button 6):
http://esp32.com/download/file.php?id=337

Re: Camera

Posted: Sat Jan 07, 2017 2:21 pm
by rudi ;-)
erhardd wrote:Hey rudi!
Nice to see you again. 8-)

I've begun porting the cam-app(idf) from krzychb to Arduino-IDE.
The steps are:
1. - init GLCD in 8-bit mode and prepare to output to(in my case-ILI9325) reg-r22;
2. -start the XCLK-Output;
3. -begin preview by cont. write to reg.r22;

krzychb is writing to framebuffer. For further filtering to serial output.
This is not neccessary for preview-only.
Look at the beginning(outcommented) at(under Programm-Button 6):
http://esp32.com/download/file.php?id=337
;-)
happy new year erhardd!

print_fb() prints the pixel ( byte ) as ASCII.
i tried to use this data as 256 color picture:
( for upload and show have converted from bmp to jpeg )
80x60_256_temp.jpg
80x60_256_temp.jpg (5.57 KiB) Viewed 26900 times
i will try to use fb dma and draw_fb(*data) with a simple array picture[col][row]

-> https://github.com/espressif/esp32-nese ... lcd.c#L290

i will have a look to yours :)

best wishes
rudi ;-)

Re: Camera

Posted: Sat Jan 07, 2017 3:03 pm
by erhardd
In ov7725.c the "set_pixformat(sensor_t *sensor, pixformat_t pixformat)" only :
case PIXFORMAT_RGB565:
will be used for the preview at the GLCD.
In the .ino:
ucg.setPrintPos(0,0);
//Prepare_Write_RAM();
UCG_C10(0x0022) ; // LCD_WriteIndex(0x0022);

No need for framebuffer.
The continous stream will be displayed..
To do:
-break this stream(h-sync) with a touch at the screen at full picture and read out the GRAM of the Display to save on SD-card or send to a browser (or both).
p.s.:
I've done this with an ATmega128 and also with LPC2148.
Why should this be imposible on an esp32?

Re: Camera

Posted: Sat Jan 07, 2017 8:44 pm
by ESP_krzychb
Hi rudi,

I have not been using OV7670 with or without LCD.

Checking briefly to the data sheet OV7670, it looks similar to OV7725.
I would start by checking if register settings in default_regs[][2] in file ov7725.c match what is required to set up OV7670.

Also, as mentioned by erhardd, to push the date directly to LCD, the pixel format should be changed to RGB.
In original esp32-cam-demo UYV format is set up and YV information discarded.
It looks to me that LCD on my WROVER accepts pixels in BRG format, so this is another point to verify.

I am sure you will nail it down as you did with adopting ILI9341 driver by ESP_nilay and esp31-smsemu by ESP_Sprite :D

Looking forward for update from you and erhardd!

Krzysztof