Comments (8)
Hi Nick,
It is probably something that is for the regular SDK I think. I will try to nudge one of the developers to look at this issue. Maybe they know more!
from aideck-gap8-examples.
Hey Kim,
thank you for your help. If there is a public discussion or you need more info let me know.
from aideck-gap8-examples.
Hi Nick,
Sorry for my late reply for your issue.
About your problem of camera, it's not the SDK/HW problem, but it's a known hw limitation:
- For single short mode: "start" and "stop" are necessary to capture a clean image.
- For continuous mode: you don't need "start" and "stop" for each frame, but just before/after the streaming.
This continous mode means you need to keep "always 2 capture task in uDMA (even each task is not a full image)", like what we do in this example: gap_sdk/examples/pmsis/bsp/cameras/test_camera_stream
In this case, the uDMA will keep working and you will get the full image streaming.
from aideck-gap8-examples.
Hey Yao,
thank you for your reply. So, if I understand you correctly, there is no good way to retrieve a single image without the tiling in single shot mode?
Let me summarize what I tried:
Single Shot Mode
This is what should be achieved in this example: https://github.com/bitcraze/AIdeck_examples/blob/master/GAP8/test_functionalities/test_camera/test.c -- Capture a single image from the camera and save it to the disk.
But I was only able to capture a clean image with a double start/stop command. Something among the lines (throwing out other stuff):
Sync
...
pi_camera_control(&camera, PI_CAMERA_CMD_START, 0); // I added this
pi_camera_control(&camera, PI_CAMERA_CMD_STOP, 0); // I added this
pi_camera_control(&camera, PI_CAMERA_CMD_START, 0);
pi_camera_capture(&camera, buff, BUFF_SIZE);
pi_camera_control(&camera, PI_CAMERA_CMD_STOP, 0);
pi_camera_close(&camera);
...
Async
...
pi_camera_control(&camera, PI_CAMERA_CMD_START, 0); // I added this
pi_camera_control(&camera, PI_CAMERA_CMD_STOP, 0); // I added this
pi_camera_capture_async(&camera, buff, BUFF_SIZE, pi_task_callback(&task, handle_transfer_end, NULL)); // handle_transfer_end sets done to true.
pi_camera_control(&camera, PI_CAMERA_CMD_START, 0);
while(!done){pi_yield();}
pi_camera_control(&camera, PI_CAMERA_CMD_STOP, 0);
pi_camera_close(&camera);
...
Continuous Mode
For the continuous mode I looked at the example you mentioned. But since in test_camera_stream
the buffer is just dumped to disk I can not confirm that it is a clean image (or is there an easy way?).
Therefore, I looked at this other example: https://github.com/GreenWaves-Technologies/gap_sdk/blob/release-v3.7/examples/pmsis/bsp/cameras/test_camera_lcd/test_camera_lcd.c
Here, the image is saved as an actual image. But the images are only clean starting from the 2nd image. So the first one is also tiled (basically unusable) in the same way as the one I already uploaded in my initial post. But I guess in continuous mode you could neglect that, given it's a HW limitation. It's just something what needs to be noted down somewhere then I guess.
Question
So basically my questions boil down to:
- @Yaooooo How to ensure that you get a clean image when performing a single shot capture? --> Is my solution (double start/stop) valid due to the hardware Iimitation or is there a better way to do it?
- @knmcguire If you want I can update the
test_camera
-example according totest_camera_lcd
andtest_camera_stream
to (also) capture continuously?
from aideck-gap8-examples.
Hi @SuperN1ck, You have my blessing to update the test camera examples :) If you haven't done it already
from aideck-gap8-examples.
Hi @SuperN1ck ,
I am from GreenWave, actually, I may found your issue and fixed in the test_functionalities/test_camera
Since I cannot push my fixes in Bitcraze's repo, I do a pull request for you: SuperN1ck#1
Then you can redo a pull request for Bitcraze to include this changes.
Please tell me if it works for you.
from aideck-gap8-examples.
I guess this already was fixed in in PR #23 right?
from aideck-gap8-examples.
Yes it was fixed to a degree which don't imply any modifications in the GAP SDK itself (see: SuperN1ck#1). The problem still occurs sometimes for me when not using the default values, but I think this is more related to the GAP SDK so it might make sense to reopen an issue there but I'm fine for now.
from aideck-gap8-examples.
Related Issues (20)
- Make CPX API thread safe
- classification example will not perform make HOT 1
- remove opencv dependency warning
- CFloader flash img hangs at 99% with the classification demo HOT 5
- Flashing of GAP8 sometimes stops at 3-4% HOT 14
- Wifi image streaming hangs, when executed multiple times. HOT 8
- Question: custom network for Ai deck (classification example) HOT 4
- cpx array sending example to crazyflie HOT 6
- [Urgent] Unable to resolve host address to greenwaves? HOT 4
- Rework aideck repo docs HOT 1
- Enforce CPX version
- Add LED error message
- Investigate corrupt bootloader with firmware
- wifi-img-streamer slows down when there are multiple streamers
- Himax camera does not work at lower resolutions HOT 2
- Issues with the classification demo HOT 7
- FaceDetection issue for SDK 4.+ HOT 1
- Document how to log from the ESP32 or Gap8
- make menuconfig error HOT 1
- Document changes needed to use the filesystem and add example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aideck-gap8-examples.