Ask Your Question
0

convert uchar image in short [closed]

asked 2017-05-31 10:41:12 -0500

LBerger gravatar image

Hi, I have an image of type 8U and i need to convert it in 16S. any help would be appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by LBerger
close date 2017-05-31 10:47:53.388400

1 answer

Sort by » oldest newest most voted
0

answered 2017-05-31 10:44:20 -0500

LBerger gravatar image

Use convertTo method.

Mat x(10,12,CV_8UC1),y;
x.convertTo(y,CV_16S,128);   // y =128*x;
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-31 10:41:12 -0500

Seen: 114 times

Last updated: May 31 '17