Ask Your Question
0

Positioning putText() with floating-point

asked 2013-10-04 13:48:58 -0600

Blobby gravatar image

I am trying to create some debugging text on my image (CV_32FC3). I am working with Vec3f, hence i need to position with floats aswell. Is there a way to define the Point with floats instead of ints?

edit retag flag offensive close merge delete

Comments

wait, the pixel format has got nothing to do with format of the coords

also, for visualizing, you probably want to convert(and scale) your float 3chan img to bgr, before applying puttext or similar

berak gravatar imageberak ( 2013-10-04 13:55:42 -0600 )edit

In that case i have understood its use. How can i position the text string? Although i will keep the conversion in mind..

Blobby gravatar imageBlobby ( 2013-10-04 14:03:14 -0600 )edit

just Point(20,20) or such

berak gravatar imageberak ( 2013-10-04 14:05:52 -0600 )edit

But i cannot position in floats, as i do with image.at<cv::Vec3f>() ?

Blobby gravatar imageBlobby ( 2013-10-04 14:08:46 -0600 )edit

img.at<type>(int r, int c); // <-- whatever 'type' is, r and c will be integers

why do you feel the need for doing so ? images are rasters with integral coords. full-stop.

berak gravatar imageberak ( 2013-10-04 14:14:08 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-04 14:21:52 -0600

Blobby gravatar image

I understand your point now..

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-10-04 13:48:58 -0600

Seen: 906 times

Last updated: Oct 04 '13