ImageView.jl icon indicating copy to clipboard operation
ImageView.jl copied to clipboard

Annotation positions not accurate in sub-pixel level

Open nlw0 opened this issue 5 years ago • 0 comments

There seems to be some detail missing in the calculation of annotation positions to put them in the right place when the image is zoomed it. This is a sample program, and some screenshots of the result moving around over the image. Seems like some kind of off-by-one error when calculating the transformed coordinates.

using ImageView
using TestImages

guidict = imshow(testimage("cameraman"))
annotate!(guidict, AnnotationPoint(255.01, 255.01, shape='.', size=4, color=RGB(1,0,0)))
annotate!(guidict, AnnotationPoint(255.99, 255.01, shape='.', size=4, color=RGB(1,0,0)))
annotate!(guidict, AnnotationPoint(255.01, 255.99, shape='.', size=4, color=RGB(1,0,0)))
annotate!(guidict, AnnotationPoint(255.99, 255.99, shape='.', size=4, color=RGB(1,0,0)))

image image image image

nlw0 avatar Aug 20 '20 08:08 nlw0