Greeting all! i would like to imgrate halcon code as follows to opencv c++
Threshold(OutImg, &Ref_Region, lThresMin, lThresMax);
Intensity(Ref_Region, OutImg, &hv_Mean, &hv_Deviation);
i found meanStdDev in opencv but how can i only calculate mean& std dev of certain range of threshold in the image? eg. i only want to calculate mean and std dev of threshold 155-200 in the image and ignore rest of the pixels. if i use mask(to assign rest of the pixels to 0 which is black), meanStdDev still take the whole image as first parameters.
i noticed that in halcon there is a Connection function before Intensity function. so the intensity is calculated based on the connected region but not the whole image. How can i implement in opencv to achieve same result of mean or std dev in halcon?
I am a newbie to opencv and had been searching for answer for few days but no progress…Hope someone can give me some guidance on this! Thanks in advance!