Jaonary Rabarisoa wrote:
> I'd like to use vxl to detect features in an images. In order to do
> this I have to do some smoothing and some geometrical transformation. I
> plan to use especialy the functions available in vil but the are some
> questions that I can't answer and the documentation don't help me no
> more :-(
> - what is the coordinate pixel used in the class vil_image_view? I
> mean, does the pixel coordinate (i,j) follow the standard coordinate
> system used in computer science (origin = upper letf, i from left to
> right,, j up down) or otherwise.
Well in most cases the co-ordinate system is deliberately not mentioned.
There is an i direction, and a j direction. What meaning you assign to
those directions is generally up to you. The use of i and j, and the
fact that the pixel co-ords are unsigned, were part of a deliberate
attempt to discourage any assumptions about the images being embedded in
some Cartesian reference frame.
One place where it does matter is when loading and saving images, since
most image formats do have an explicit co-ordinate system, (even if a
very simplified one.) Here vil assumes that image(0,0) is the top left
pixel. Indeed you can get the memory address of this pixel by calling
image.top_left_ptr(). Increasing i is in the horizontal direction
righwards, and increasing j downwards.
This is briefely explained in the VXL book --- see halfway down
discussed in more detail in $VXLSRC/core/vil/notes.html However, it
could be explained more explicitly --- I'll add it to the vil FAQ.
> - what are the relation between the pixel coordinate and the space
> coordinate ? Especially, when I transforme my image with vil_rotate or
> vil_wrap how can ... I control the location of my output image in the
> space ?
vil_rotate also makes the above co-ordinate assumption, although the
assumption is only necessary in so far as it affects the direction of
positive rotation, and an assumption of isotropy. The rotation is about
the image centre, I expect.
vil_warp has no explicit reference frame of its own. The meaning of the
input and output reference frames is entirely up to you. If it helps
you, you can think of the images as being embedded in the same "i is
right and j is down" frame as described above, but that isn't necessary
to understand or use vil_warp or most of the rest of vil.
If by space co-ordinates you mean some kind of world co-ordinates, then
vil makes no mention of world co-ordinates. contrib/mul/vimt provides
(amongst other things) a registered image, for locating an image in some
world co-ords reference frame.
Hope this helps.