Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the window function of the ov2640 #10

Closed
buckybots opened this issue Dec 28, 2018 · 17 comments
Closed

Using the window function of the ov2640 #10

buckybots opened this issue Dec 28, 2018 · 17 comments

Comments

@buckybots
Copy link

@buckybots buckybots commented Dec 28, 2018

I would like to use the windowing functionality, but I see that it is currently commented out in the sensor code. Does this code work?, or were there problems with the implementation? If problems, what needs to be worked out, or is this underway, and you have some time when you think it will be included.

Thanks! This new functionality is great, thanks for taking the next step on making the camera code usable.

from sensors/ov2640, line 136

//Functions are not needed currently
#if 0
//Set the sensor output window
int set_output_window(sensor_t *sensor, uint16_t x, uint16_t y, uint16_t width, uint16_t height)

@me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented Dec 29, 2018

functions are prepared, but I have not found a use for them yet, so I left them commented if someone like you pops around and wants to give them a go :) What would you use them for? They are generally called when resolution is changed, but those calls are optimised currently.

@buckybots
Copy link
Author

@buckybots buckybots commented Dec 29, 2018

Basically, digital zoom. I want to go high res on a portion of the scene.

@me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented Dec 30, 2018

Please give the functions a go :) If you find them working as expected, please provide some sort of simple example and we can uncomment and add them to the API :) Digital zoom could prove useful in some cases even for me :)

@jjbubka
Copy link

@jjbubka jjbubka commented Jan 30, 2019

I have used set_window_size, and it is working good. For example, I have an under-cif framesize of 64x64, and i can have a zoomed and centered window after initializing the sensor:
esp_err_t err = esp_camera_init(&camera_config);
esp_camera_sensor_get()->set_window_size(esp_camera_sensor_get(), 1600 / 8 - resolution[CAM_FRAMESIZE][0] / 2, 1200 / 8 - resolution[CAM_FRAMESIZE][1] / 2, resolution[CAM_FRAMESIZE][0], resolution[CAM_FRAMESIZE][1]);

Maybe it is a better option to have the functionality integrated in set_framesize, and have an input parameter about the zooming...

Best regards

@cribskip
Copy link

@cribskip cribskip commented Jun 30, 2019

As far as I understand, this code is provided with the Arduino IDE in compiled library and header form.

It would be great to have that #if 0 removed so Arduino IDE users (like me) may use the advanced functions too:

  • Set the sensor output window
  • Set the image output size (final output resolution)
  • Set the image window size >= output size
  • Set the sensor resolution (UXGA, SVGA, CIF)

Is this possible?

Best regards

@nigelorr
Copy link

@nigelorr nigelorr commented Apr 30, 2020

It would be great to have access to this in Arduino, is there any progress?

@me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented May 1, 2020

all cameras now have their own function to manage the window. Will be updated in Arduino soon as well.

@dougmsbbs
Copy link

@dougmsbbs dougmsbbs commented May 1, 2020

Any hint as to how soon 'soon' is? I bought the camera assuming this was already in and working in the Arduino code. My bad, I should have verified it first. Sure would like to move the project forward, though. I know we're asking a lot of people already busy turning out some great stuff, but this really is useful feature to have.

@nigelorr
Copy link

@nigelorr nigelorr commented May 4, 2020

all cameras now have their own function to manage the window. Will be updated in Arduino soon as well.

That's great news. How long is it likely to take to push to Arduino? A week? A month? Looking forward to this, hope it is soon.

@ntasher
Copy link

@ntasher ntasher commented Jul 19, 2020

Any news? I also want to use this in Arduino and I can't figure out if there is a manual way to do it.
Thanks.

@gcalhoun1949
Copy link

@gcalhoun1949 gcalhoun1949 commented Feb 26, 2021

Is the windowing function available in Arduino IDE yet? I also have a need for setting ROI.
Thanks.

@CraigBarton9
Copy link

@CraigBarton9 CraigBarton9 commented Apr 16, 2021

I want to use the camera at its highest resolution to monitor size changes of a target over time. I only need to sample strips from the image relatively infrequently (every 5 mins). I am using the Arduino IDE and an ESP32Cam with 4Mb so pretty tight on memory to capture and process an image at high resolution (trying to use GRAYSCALE). So the ability to capture different parts of the scene and process them would be useful. Trying to understand all the inner workings of the program is stretching me to my limits. I see
int set_window(sensor_t *sensor, ov2640_sensor_mode_t mode, int offset_x, int offset_y, int max_x, int max_y, int w, int h)
in the ov2640.c file but not in the header and so am unsure what the parameters refer to.
Any advice/help would be gratefully received.

@dougmsbbs
Copy link

@dougmsbbs dougmsbbs commented Apr 17, 2021

Well, I'm going to guess they don't care about this. It's been about a year just since I asked, and still no response. Guess I'll give up on using their stuff and move on to some other platform. Too bad. I think it would have worked great.

@gcalhoun1949
Copy link

@gcalhoun1949 gcalhoun1949 commented Apr 19, 2021

@github-actions
Copy link

@github-actions github-actions bot commented Sep 12, 2021

This issue appears to be stale. Please close it if its no longer valid.

@nigelorr
Copy link

@nigelorr nigelorr commented Sep 12, 2021

Has this made it into Arduino yet? Would be very useful but no further news since last April

@me-no-dev
Copy link
Member

@me-no-dev me-no-dev commented Sep 24, 2021

@nigelorr it has made it in 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants