1 2 3 4 5 6 7 8 9 10 11 12 13
|
cvConvertScaleAbs(frameFromCamera->Ptr.ToPointer(),frameDisplay->Ptr.ToPointer(),double(1)/16,0);
cvCvtColor(frameDisplay->Ptr.ToPointer(),frameColorDisplay->Ptr.ToPointer(),CV_GRAY2BGR);
cvThreshold(frameDisplay->Ptr.ToPointer(),maskSaturated->Ptr.ToPointer(),200,255,CV_THRESH_BINARY);
cvNot(maskSaturated->Ptr.ToPointer(),mask1->Ptr.ToPointer());
cv::Scalar red(0,0,255);
cvSet(frameColorDisplay->Ptr.ToPointer(),red,maskSaturated->Ptr.ToPointer());
imageMain->Image=frameColorDisplay;
if(frameFromCamera->InRange(new Bgr(0, 0, 200),new Bgr(0, 0, 255)) == 255){
tbMorse->Text ="1";
}
else{
tbMorse->Text = "0";
}
|