SQRT function doesn't work on uint16 image type

So, my problem is: I have to load an image in png format an represent it as a matrix. I can do it with imread. But as soon as I performed function like sqrt it shows error message:
Undefined function 'sqrt' for input arguments of type 'uint16'
What should I do? Can somebody help?

 Accepted Answer

Convert them to the double data type first.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 10 Dec 2014

Commented:

on 10 Dec 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!