Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attempt to call constructor image with incorrect letter case

631 views
Skip to first unread message

Niranjan L

unread,
Jan 26, 2010, 6:34:02 AM1/26/10
to
p=zeros(128);

for k = 1:size(ellipse,1)
asq = ellipse(k,2)^2; % a^2
bsq = ellipse(k,3)^2; % b^2
phi = ellipse(k,6)*pi/180; % rotation angle in radians
x0 = ellipse(k,4); % x offset
y0 = ellipse(k,5); % y offset
A = ellipse(k,1); % Amplitude change for this ellipse
x=xg-x0; y=rot90(xg)-y0; % Center the ellipse
cosp = cos(phi); sinp = sin(phi);
idx=find(((x.*cosp + y.*sinp).^2)./asq + ((y.*cosp - x.*sinp).^2)./bsq <= 1);
p(idx) = p(idx) + A;
end

imshow(p);

for the above code, the error is:

??? Attempt to call constructor image with incorrect letter case.
Error in ==> imshow at 246
hh = basicImageDisplay(fig_handle,ax_handle,...

How can I solve this problem?

ImageAnalyst

unread,
Jan 26, 2010, 6:44:28 AM1/26/10
to
I tried to test it for you and this is what I get:

??? Undefined function or variable 'ellipse'.

Can you say what toolboxes you use, or else provide ALL of the code
necessary to test your code?

Niranjan L

unread,
Jan 26, 2010, 7:07:02 AM1/26/10
to
I=imread('D:\Wallpapers\Sivaji the boss\280427695_e24cd341aa_m.jpg');
imshow(I);
when i execute d program i get this error message.


??? Attempt to call constructor image with incorrect letter case.


Error in ==> basicImageDisplay at 9
hh = image(xdata,ydata,cdata, ...

Error in ==> imshow at 223
hh = basicImageDisplay(fig_handle,ax_handle,...


how to solve it?

ImageAnalyst

unread,
Jan 26, 2010, 8:25:36 AM1/26/10
to
To solve it, use standard debugging methodology, such as using the
debugger. Set a breakpoint and see what "I" really is. Also you do
standard things such as trying to open that image in another program
such as Photoshop. You could also post your image to http://drop.io
so others can easily see it, download it, and try to display it in
their version of MATLAB. Calling The Mathworks for help is yet
another option (as long as you don't have the student version).

As far as MATLAB goes, there is a whole section in the help on useful
debugging techniques.

0 new messages