IDL out of range error [message #70159] |
Mon, 15 March 2010 17:18 |
Suguru Amakubo
Messages: 24 Registered: March 2010
|
Junior Member |
|
|
Hi, I have an error that has been bugging me for 3 weeks that I am
hoping you could shed some light on.
I am currently trying to create a subset of an image from a bigger
image and comparing it to another subset of the same dimention.
When I run the program however I recieve an error:
Subscript range values of the form low:high must be >= 0, < size, with
low <= high:
I have checked my array and it is in the form:
im=image_file(X1:X2, Y1:Y2)
below is actual line:
sub = new_image2(x0:x0+L-1, y0:y0+L-1)
where x0 and y0 is the coordinate on the large image that the array
will be taken from. (L is an integer constant value)
here is the array that I am trying to compare it to:
test = new_image2(i1:i1+L-1, i2:i2+L-1)
(i1 and i2 is the new coordinate that will be allocated by cycling it
through using a for loop)
and the equation that i use to compare it with
delta = (total(sub-test))^2
when I checked both sub and test has the same dimention L and they
both position in the original image...
I apologise in advance if I haven't provided enough information or
made any social errors, its my first post here.
|
|
|