フィルターのクリア

Remove Border or Pixel values of zero

4 ビュー (過去 30 日間)
Karthik Thiyagarajan
Karthik Thiyagarajan 2014 年 10 月 18 日
コメント済み: Image Analyst 2014 年 10 月 20 日
hi all,
I have this image and want to remove the black outline (the dark region) , i.e I need the square region in the box
I have tried using imclearborder() and other function
hold on
for i=1:r
for j=1:c
if (impixel(g,j,i)<1)
GRAY(i,j)='delete';
end
end
end
hold off
but still have a problem..can some one help me?? please?

採用された回答

Image Analyst
Image Analyst 2014 年 10 月 18 日
Even if you do crop it, it's still tilted and you will still have black triangles at the edges, unless you straighten it with imwarp(). So, what do you want those black triangles to be? White? The mean of the gray noisy area? Some color? What exactly?
  5 件のコメント
Image Analyst
Image Analyst 2014 年 10 月 19 日
Well you blew your chance by ignoring my request to help you "Can you post the original image" - I'll check back sometime later. In the meantime, simply threshold, label, and call regionprops to ask for bounding box. I'll check back later to see if you posted the original image. When you force people to do things like import your annotated image into Photoshop to fix it, then often they just don't bother. That's something you should do if you want help, not us.
Image Analyst
Image Analyst 2014 年 10 月 20 日
Karthik:
Not sure if you're still interested in my help or not. But I wrote some code to produce the image I asked you to upload from the screenshot you did upload. Then I found the black surround and cropped it. See code attached below the image it produces:

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by