opencv - How do I successfully convert a 32b image to 8b? -


i have input image of type cv_32uc3 rgb mat convert cv_8uc3. have tried using convertto method follows:

img.convertto(dst, cv_8uc3, 0.00390625) 

however, resulting image black.

my question is, how convert 32b 3 channel image 8b?

i believe scale backwards. if want scale floating point image (0-1 values) 8 bit need use 255 scale factor.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -