How to convert all csv file to grayscale image and then save them?

13 views (last 30 days)
I have a database of experiment .csv files. how to extract the feature from this csv file with max min normalization? I need a matrix(with values between 0 to 255) to be converted to a gray scale image.

Accepted Answer

Jan
Jan on 5 Feb 2021
T = readtable('file.csv');
V = T.Variables;
V = V - min(V(:));
V = V ./ max(V(:)) * 255;
Img = uint8(V);
Now the matrix Img is a greyscale image.

More Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!