Skip to main content
Associate II
March 18, 2025
Solved

Changing Hue, Saturation, and Brightness on SMT32H747I-Disco Board, Application Code from Model Zoo

  • March 18, 2025
  • 1 reply
  • 2202 views

Hi @Julian E. , I want to change the Hue, Saturation, and Brightness of the B-Cams OMV camera all at once while running the image classification application code from the Model Zoo. However, when I run my code, only the last value gets captured and reflected on the board. For example, if my code is 

 

void Camera_StartNewFrameAcquisition(AppConfig_TypeDef *App_Config_Ptr)
{ 
 App_Config_Ptr->new_frame_ready = 0;
 Camera_Set_HueDegree(App_Config_Ptr->mirror_flip);
 Camera_Set_Saturation(App_Config_Ptr->mirror_flip);
 Camera_Set_Brightness(App_Config_Ptr->mirror_flip);

 /***Resume the camera capture in NOMINAL mode****/
 BSP_CAMERA_Resume(0);

}

 

Only the Brightness gets changed and not Hue or Saturation. I've made changes to the apps_camera.c only as shown above. I've also included a copy of the version I'm using.  I would really really appreciate if anyone can guide me on how to change all three features at once. I am very desperate.

Best answer by Julian E.

Hello @rt_ecyhg1,

 

Yes, but you probably need to edit the 2 other functions for hue and saturation to make sure that they are not editing the same registers. 

The important part in the example correction is the end of the function where we added bit masking. Here is a video that explains it.

https://youtu.be/Ew2QnDeTCCE?feature=shared 

 

The idea is that if you use the brightness function and set a value in OV5640_SDE_CTRL8, the other functions that also edit this register must use bit masking to edit some bits without changing the bits already changed with the brightness function.

 

Make sure to use the datasheet of the camera that explains which bits and registers are being edited to apply the good masks.

OV5640_datasheet.pdf

 

I am not very knowledgeable about that kind of things but if you can probably ask for help in another forum board like the STM32 MCUs Embedded software - STMicroelectronics Community to receive help creating your masks.

 

Have a good day,

Julian

 

 

 

1 reply

rt_ecyhg1Author
Associate II
March 19, 2025

I'm really desperate to make it work, please if anyone has any solution to try please share it

Julian E.
Technical Moderator
March 19, 2025

Hello @rt_ecyhg1 ,

 

I have asked internally, I am waiting for answers.

I'll update you as soon as I know more.

 

Have a good day,

Julian

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
rt_ecyhg1Author
Associate II
March 19, 2025

Hi Julian.

Thank you so much.