LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
toolbox
img2bin.m
Go to the documentation of this file.
1
function [img] =
img2bin
(path,grayValue,invert)
2
data = imread(path);
3
data = rgb2gray(data);
4
for
ki=1:size(data,1)
5
for kj=1:size(data,2)
6
if(invert)
7
%Phase für jedes Pixel berechnen
8
if(data(ki,kj)>grayValue)
9
data(ki,kj)=0;
10
else
11
data(ki,kj)=255;
12
end
13
else
14
%Phase für jedes Pixel berechnen
15
if(data(ki,kj)>grayValue)
16
data(ki,kj)=255;
17
else
18
data(ki,kj)=0;
19
end
20
end
21
22
end
23
end
24
img=data;
25
%figure();
26
%imshow(data);
27
end
28
img2bin
function img2bin(in path, in grayValue, in invert)
Generated on Thu Feb 23 2023 12:36:40 for LAT Hologramm-Software 2.0 by
1.9.5