Conversion to unit8 data class in MATLAB

£可爱£侵袭症+ 提交于 2019-12-11 14:54:00

问题


I am new to matlab in beginner phase. I want to know that

How to convert a (2*3) matrix having values out side the range [0 255] to an uint8?

I am trying to convert it to unit8 data class but it gives me the following error with the following syntax. B=unit8(A). where A is 2*3 Matrix values [4 5 6 ; 2 4 5]

error: Undefined function 'unit8' for input arguments of type 'double'.


回答1:


It is spelling Mistake. it is uint8 not unit8



来源:https://stackoverflow.com/questions/19180466/conversion-to-unit8-data-class-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!