matlab - improfile output length doesn't comply with input vectors length -


i have code draws circle consisted of 50 points. want calculate intensity of each point, used improfile.

theta=linspace(0,2*pi,50);   rho=ones(1,50)*radius; [x,y] = pol2cart(theta,rho); x=x+center(1); y=y+center(2);  c = improfile(bw4,x,y); % bw4 binary thinned image 

i know c must vector containing intensity of 50 points produced when write size(c) in work space this:

>> size(c)  ans =  142     1 

i can't understand problem code? idea why it's working way? thanks

improfile follow path defined coordinates x,y provided not give results @ these exact coordinates.

use syntax c=improfile(i,xi,yi,n) n=50. in case:

c = improfile(bw4,x,y,50); 

this force output [50x1] vector.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -