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?

 採用された回答

Star Strider
Star Strider 2014 年 12 月 10 日

0 投票

Convert them to the double data type first.

2 件のコメント

Imam
Imam 2014 年 12 月 10 日
Ok thanks a lot.
Star Strider
Star Strider 2014 年 12 月 10 日
My pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2014 年 12 月 10 日

コメント済み:

2014 年 12 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by