简体   繁体   中英

c++ convert cv::Mat from CV_8U to CV_32F

I'm having an issue with OpenCV (Assertion Failure) as the image is being loaded as CV_8U when it should be loaded as CV_32F.

So how can i convert from CV_8U to CV_32F?

Many Thanks.

使用convertTo

input.convertTo(output, CV_32F)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM