1 / 9

Lesson 3

Lesson 3. 找一直線的的二個端點. clear; close ; img(1:300,1:100)=uint8(0); imshow (img);. for ii=1:300 for jj=1:ii img(ii,jj)=255; end end imshow(img);. clear; close ; img1=ReadImage('c:line.bmp'); imshow(img1); img2 = RGB2Gray(img1);

fia
Download Presentation

Lesson 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 3

  2. 找一直線的的二個端點

  3. clear; close; img(1:300,1:100)=uint8(0); imshow(img);

  4. for ii=1:300 for jj=1:ii img(ii,jj)=255; end end imshow(img);

  5. clear; close ; img1=ReadImage('c:\line.bmp'); imshow(img1); img2 = RGB2Gray(img1); figure(); ShowImage(img2, 'Gray Level Image'); img3=im2bw(img2,0.5); figure(); ShowImage(img3, 'Black and White Image');

  6. [m n]=size(img3) quit_loop=%F; tic for ii=1:1:m for jj=1:1:n if (img3(ii,jj)==%F & quit_loop==%F) then ansii=ii ansjj=jj quit_loop=%T; end end end toc

  7. 找三角形的三個頂角

  8. 找四邊形的四個頂角

  9. 找十字線中心點

More Related