Extract Red Line From JPEG
古いコメントを表示
Hi There,
I need to extract this red line from the image.
The line was drawn on and the file saved as a JPEG so it may be possible to simply extract this element from the image.
I do not know the exact tone of red so am unable to simply search for pixels in that colour.
Is there a way I can detect the red parts of the image so that I can isolate them to use later as required?
I have tried using getpts to click on the red line however for some reason it always returns a different colour value.
clear all
im = imread('Images/Annotated/2x_LN063B1_an.jpg');
im_original = im;
im = imresize(im,[3200,3200]);%resize
imshow(im)
hold on
[x,y] = getpts;
x = round(x);
y = round(y);
imcolour = im(x,y)

2 件のコメント
Star Strider
2021 年 2 月 17 日
Attaching the image could be helpful.
Samuel Leeney
2021 年 2 月 17 日
採用された回答
その他の回答 (1 件)
Image Analyst
2021 年 2 月 18 日
0 投票
Try the Color Thresholder on the Apps tab of the tool ribbon. From there you can export code for a function that you can then call and use in your main program.
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
