How do i remove the irregular white pixels from the preprocessed image.
i have tried doing erosion and that would make all pixels black.
After Preprocessing:
Requirement:
My Code:
Mat  img, edges, erode, blurred, element;
element = getStructuringElement(cv::MORPH_RECT, cv::Size(7, 7), cv::Point(-1,-1) ); 
img = imread("img1925.jpeg");    //  read the image
cv::Canny(img, edges, 30, 255, 3);    // detect the edges with threshold limit
//    cv::erode(edges, erode, element);
GaussianBlur(edges, blurred, cv::Size(7, 7), 0);    // blurring
//    Rect ROI = boundingRect(blurred);       // draw rect for ROI
//    Mat src = thresh(ROI);
namedWindow("image", WINDOW_NORMAL);
imshow("image", blurred);
waitKey(0);
return 0;
Looking for suggestions!


 
    

