I want to threshold a binary image. My code runs, but if the user wants to set the min value of the threshold to a float the IMAQ Threshold function automatically cast the float to an int, thus taking away the precision i need. Here is the code I am using to do the threshold. Thanks in advance.
object->Cast(image,image,IMAQ_IMAGE_U8,vOptionalParam,vOptionalParam);
C_CWIMAQMultiThresholdData threshData=object->CreateCWIMAQMultiThresholdData();
CCWIMAQMultiThresholdDataItem item=threshData.Add(COleVariant((long)1));
threshData.Item(COleVariant((long)1)).GetThresholdRange().SetMin(GetThreshold()); //Get threshold returns a float
threshData.Item(COleVariant((long)1)).GetThresholdRange().SetMax(255.0);
object->MultiThreshold2
(image,image,threshData);