findOuterEdge.asv

findOuterEdge.asv - ≠ded it line[rows cols = size(Grecord...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 function pts = findOuterEdge(n) % pts = findOuterEdge(n): returns a list of n points corresponding % to the outer edge of the record. Input image files are assumed % to be in a standard orientation. By default n is 1/3 of pixels global Grecord %num_img = 1% added line %Gdir= '\\samba1\szheng\dcengr\Desktop\scaned section' Grecord = imread(sprintf('%s/%d.png',Gdir,num_img))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %added it line [rows cols] = size(Grecord) if nargin < 1 n = ceil(cols/3) end pts = zeros(n,2) white = 255 done = 0 j = 1 i = 1 pts_cnt = 1 for j = 1:floor(cols/n):cols while ~done if Grecord(i,j)<white pts(pts_cnt,:) = [i,j] pts_cnt = pts_cnt+1 done = 1 end if i==rows done = 1 end i = i+1 end done = 0 i = 1 end figure(2) %plot(pts(1,:))...
View Full Document

This note was uploaded on 04/20/2008 for the course ENGR 190 taught by Professor Staff during the Spring '08 term at Santa Clara.

Ask a homework question - tutors are online