Camera stream upside down
-
- Beginner
- Posts: 20
- Joined: Thu Oct 08, 2020 2:45 pm
Camera stream upside down
I am trying to run the wifi_jpeg_streamer example, but the image is upside down. I tried changing some of the parameter within the "test.c" file where the camera is rotated, but I have not been able to rotate the image. Can anyone suggest a workaround or what to change? I am unable to use the AI-Deck if the image is upside down.
Re: Camera stream upside down
hi!
Do you see this happening if you are flashing on RAM (make run) or if you are flashing it on the flash memory (make flash) ?
Do you see this happening if you are flashing on RAM (make run) or if you are flashing it on the flash memory (make flash) ?
-
- Beginner
- Posts: 20
- Joined: Thu Oct 08, 2020 2:45 pm
Re: Camera stream upside down
It is happening when running from RAM and from Flash memory.
Re: Camera stream upside down
That is strange. This code is setting a register in the camera module to rotate the image and it has no effect?
Do you get the "Failed to rotate camera image" output if running in RAM though the debugger.
Code: Select all
// rotate image
uint8_t set_value=3;
uint8_t reg_value;
pi_camera_reg_set(&camera, IMG_ORIENTATION, &set_value);
pi_camera_reg_get(&camera, IMG_ORIENTATION, ®_value);
if (set_value!=reg_value)
{
printf("Failed to rotate camera image\n");
return -1;
}
printf("Rotated camera image\n");
-
- Beginner
- Posts: 20
- Joined: Thu Oct 08, 2020 2:45 pm
Re: Camera stream upside down
The code you posted has no effect without adding the following command to activate the AEG before rotating the image. After appending the following to the code, the camera is properly rotated when running the wifi_jpeg_streamer example from RAM, however, it prevents the example from running from FLASH memory and no image is received.
uint8_t set_value = 3;
// image rotation
pi_camera_reg_set(&camera, IMG_ORIENTATION, &set_value);
// activate AEG
pi_camera_control(&camera, PI_CAMERA_CMD_AEG_INIT, 0);
uint8_t set_value = 3;
// image rotation
pi_camera_reg_set(&camera, IMG_ORIENTATION, &set_value);
// activate AEG
pi_camera_control(&camera, PI_CAMERA_CMD_AEG_INIT, 0);
Re: Camera stream upside down
That is a weird behavior. First thing the image should be rotated in the wifi_jpeg_streamer example. What AI-deck version do you have and what camera? Second thing I don't understand why it does not run from flash.
-
- Beginner
- Posts: 20
- Joined: Thu Oct 08, 2020 2:45 pm
Re: Camera stream upside down
I have the AI-Deck V1.1. It is very strange, but per other posts on the forum, this is not an isolated issue and there are other people reporting it as well.
Re: Camera stream upside down
Are you referring to the problem of running the example from RAM if the JTAG isn't detach between power cycles? That the camera image isn't rotated in the wifi_jteg_streamer example I have never seen before.this is not an isolated issue and there are other people reporting it as well.
Re: Camera stream upside down
please try again with the examples! This is hopefully fixed now..