ssa
1clear; close all; clc;
2% Names
3names = ["P1H1" "P1LC1" "P1LC2" "P1LC3" "P1LC4" "P1LC5" "P1LC6" "P1LC7" "P1M1" "P1M2" "P1M3" "P2LC1" "P2LC2" "P2LC3" "P2LC4" "P2LC5" "P3LC1" "P3LC2" "P3LC3" "P3LC4" "P3LC5"];
4names = ["P1H1" "P1LC1"];
5names = ["P1H1"];
6zrp="endh/"; % Zero Folder
7
8%%% Îò÷¸ò ïî âèäåîðÿäó:
9for iName = 1:length(names)
10Name = names(iName);
11Path=zrp+Name+'/';
12
13%% Ñ öâåòîâîé êîìïåíñàöèåé
14try
15disp(Name+" ñ öâåòîâîé êîìïåíñàöèåé"); ncPrefix="";
16RGB=load(Path+Name+ncPrefix+'_RGB.txt');
17RGBmed=Median1RGB(RGB);
18pw=rgb2pw(RGBmed, "Cr");
19Save(pw,Path+Name+ncPrefix+'_pw.txt');
20chss2(pw, Path, Name+ncPrefix);
21CloseFigure
22catch
23disp("ERROR: Îøèáêà ïðè ôîðìèðîâàíèè îò÷¸òà ïî "+Name+" ñ öâåòîâîé êîìïåíñàöèåé");
24end
25
26%% Áåç öâåòîâîé êîìïåíñàöèåé
27try
28disp(Name+" áåç öâåòîâîé êîìïåíñàöèåé"); ncPrefix="_nc";
29RGB=load(Path+Name+ncPrefix+'_RGB.txt');
30RGBmed=Median1RGB(RGB);
31pw=rgb2pw(RGBmed, "Cr");
32Save(pw,Path+Name+ncPrefix+'_pw.txt');
33chss2(pw, Path, Name+ncPrefix);
34CloseFigure
35catch
36disp("ERROR: Îøèáêà ïðè ôîðìèðîâàíèè îò÷¸òà ïî "+Name+" áåç öâåòîâîé êîìïåíñàöèåé");
37end
38end
39close all;