LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
prepImage.m
Go to the documentation of this file.
1function [output] = prepImage(path, x,y,resizeMode, color, limitGrayLevel, invert)
2
3if(path~="")
4 image = zeros(x,y);
5 input=imread(path);
6 if(color == "grayValues")
7 input=rgb2gray(input);
8 if(invert)
9 image = 1-(double(input)./256);
10 else
11 image = double(input)./256;
12 end
13 elseif(color == "binary")
14 image=img2bin(path,limitGrayLevel,invert);
15 end
16
17 output = transpose(ResizeImage(image, y,x,resizeMode));
18 %imshow(output)
19end
20
function ResizeImage(in input, in x, in y, in mode)
Passt ein Bild an eine andere Auflösung an. Verschiedene Anpassungsoptionen wählbar.
function img2bin(in path, in grayValue, in invert)
function prepImage(in path, in x, in y, in resizeMode, in color, in limitGrayLevel, in invert)