JuliaImages / ImageView.jl

Interactive display of images and movies
MIT License
135 stars 34 forks source link

Annotation positions not accurate in sub-pixel level #223

Closed nlw0 closed 3 months ago

nlw0 commented 4 years ago

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