This widget could not be displayed.
This widget could not be displayed.

Machine Vision

This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set camera attribute - no result

Hello

 

my camara work fine with MAX.

But in CVI i have problem with the camara attribute.

 

 

  imaq1394CameraOpen2 ("cam0", IMG1394_CAMERA_MODE_CONTROLLER, &Session_Id_cam0);
 
  VIImagePointer = imaqCreateImage (IMAQ_IMAGE_RGB_U64, 0);

  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_VIDEO_FORMAT, 7);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_VIDEO_MODE, 0);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_FORMAT7_COLORCODING, 5);
  
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_AUTO_EXPOSURE, 125);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_BRIGHTNESS, 16);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_GAMMA, 0);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_HUE, 40);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_SATURATION, 381);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_SHARPNESS, 0);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_WHITE_BALANCE_U_B, 503);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_WHITE_BALANCE_V_R, 625);
  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_SHUTTER, 850);     

  imaq1394SetAttribute (Session_Id_cam0, IMG1394_ATTR_GAIN, 50); 
   
  imaq1394SnapImage (Session_Id_cam0, VIImagePointer, IMAQ_NO_RECT);

 

there no difference in the picture if i change the value.

Have i forgot somethings?

 

best regards

 

 

 

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 1 of 4
(3,748 Views)

Hey,

 

I would suggest to use one of the examples showing how to set the attributes programmatically, there should be one named "Grab and Attributes Setup".

You can then change the attributes under MAX, save the configuration and see how the attributes change in code to figure out how to set them later on.

 

Hope this helps,

Christian

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 2 of 4
(3,721 Views)

I totally agree with Christian

Taking Examples as a starting point would save you lots of efforts. Also make sure that all atributes you try to set are supported by your camera type.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 3 of 4
(3,702 Views)

Hello,

 

i work with the commandos:

IMAQdxConfigureAcquisition (Session_Id_cam0, 1, 10);
IMAQdxStartAcquisition (Session_Id_cam0);
IMAQdxSnap (Session_Id_cam0, VIImagePointer);
IMAQdxStopAcquisition (Session_Id_cam0);

It works.

But the function

"IMAQdxGetAttribute (Session_Id_cam0, "CameraInformation::ModelName", IMAQdxValueTypeString, CharTemp00);"

 dosn't work.

The attribute exist. I test it with the sample "Grap and Attributes Setup".

Have someone a idea.

 

best regards

 

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 4 of 4
(3,677 Views)