how to connect the detection object

2 ビュー (過去 30 日間)
yasmin ismail
yasmin ismail 2023 年 7 月 11 日
回答済み: Image Analyst 2023 年 7 月 12 日
I am biggener in using matlab , i used different filter and thresholding methods but stil discountiuity in object detection as shown in attach imeges
Thus anyone have suggestion to fix this issues, please
  2 件のコメント
Rahul
Rahul 2023 年 7 月 11 日
Hi Yasmin,
Could you give share more details regarding what exactly is your aim.
According to the photo shared I believe that edge detection methods can detect the inconsistant line.
However, if you want to detect some other objects, exploring the Computer Vision toolbox from Mathworks might help. Computer Vision Toolbox - MATLAB (mathworks.com)
Thanks.
yasmin ismail
yasmin ismail 2023 年 7 月 11 日
@Rahul the attached image has marker circle indicate where the discontiuity, the crack should be contioues as original image but I tried different filter and thresholding but couldnt make the detection same as original , can you help me to fix this issue?

サインインしてコメントする。

回答 (2 件)

Kush
Kush 2023 年 7 月 11 日
You can try multple filters such as sobel, prewitt etc given in edge function of matlab, I used color thresholding and box filter to get the following result.The colour thresholding helps capture only the dark pixels since the cracks would be darker and the box filter helps connect broken edges by averaging surrounding value to a center pixel during convolution.
image = imread('inputImage.jpeg'); %Insert your input image filename here
hsvImage = rgb2hsv(image);
valueChannel = hsvImage(:, :, 3);
threshold = 0.3; % Adjust this value as needed
binaryMask = valueChannel < threshold;
convolvedImage = imboxfilt(double(binaryMask), [3,3]); %Choose a window size for blurring
finalImage = ~convolvedImage %Invert the output if necessary
imshow(finalImage);
title('Dark Color Image');

Image Analyst
Image Analyst 2023 年 7 月 12 日
Zoom in. You'll see your crack in the original image is NOT continuous. Why do you think it is?

Community Treasure Hunt

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

Start Hunting!

Translated by