how to normalize the image please provide the code for it

 採用された回答

Ahmet Cecen
Ahmet Cecen 2015 年 4 月 23 日

0 投票

Since you graced us with absolutely no specifics, I am assuming you are looking for the simplest take on the term image normalization, in that case:
NormalizedImage=(Image-min(Image(:)))*(255/range(Image(:)));

3 件のコメント

himanshu sharma
himanshu sharma 2015 年 4 月 26 日
編集済み: Image Analyst 2015 年 4 月 26 日
A=importdata('E:\m@nshu\photos\B.jpg');
figure,image(A);
title('Original Image');
I = rgb2gray(A);
figure(1)
imshow(I);
title('GrayScale Image');
//this is my code .i have to convert this gray scale image to normalized form ,i am not getting any type of result from the above method ,please provide it in a detail for this querry.
Jan
Jan 2015 年 4 月 26 日
@himanshu sharma: Please format your code properly. And please give us a chance to answer your question by providing the definition of what you call "normalization". The code posted by Ahmet does create a result and it is a usual type of normalization. Claiming only that you do not get a result does not allow to give further suggestions without guessing, what you exactly do and get.
So I strongly recommend to editi the original question and provide the required information where the readers expect them.
Image Analyst
Image Analyst 2015 年 4 月 26 日
Try calling imread() instead of importdata().

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by