Thresholding images having problems with applying Sobel functions.

1 次查看(过去 30 天)
Hello everyone! I have been stuck on this problem for days now and I have come here to figure out what I am doing wrong. I have been tasked with making some simple shapes and then applying Roberts and Prewitt operators on this image with various thresholds in the binary form. I have first of all created some basic shapes in paint as shown below. After this I created the Robert and Prewitt operators manually and this is where the problem comes after I do this I binarize this simple image using the imbinarize function with a certain threshold, and no matter what threshold I use the image will remain the same. So I am wondering why is this happening as when I utilize the normal edge function it works. But I want to understand how I can do it manually aswell. I will show the code below in pictures to determine what exactly I am doing wrong. The first image shows the code for displaying the manual binarized images with a certain thresholds. The second image shows the code for the creation of code of both the operators and the verification that thresholding works via the edge function. The third image shows the verification image using the edge function and the fourth image is the problem image which displays the same function of roberts but now manually applied, the thresholding here should not be this much and keep in mind that no matter what value I choose for thresholding the 4th image does not change. Any help is welcome If you know more please tell, I am forced to do this manually .
  2 个评论
Image Analyst
Image Analyst 2021-5-23
Please attach the original image - the one before you did edge detection on it. Chances are you can threshold that and not worry about doing an edge filter.
Tim van Schaik
Tim van Schaik 2021-5-23
That is possible! the thing is that I want it after applying the edge filter as the exercise requires to ''create'' a simple image and show ''good'' and ''bad'' performance by altering the threshold in the binary images. Nonetheless I will list the original image below.

请先登录,再进行评论。

回答(0 个)

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by