forked from iN1k1/CVPR2012
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NM_reid_wcnwasa12_images.m
30 lines (23 loc) · 1.3 KB
/
NM_reid_wcnwasa12_images.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function [ maskedImagePHOG, maskedImageGLCM, maskedImageSIFT, maskedImageWGCH] = NM_reid_wcnwasa12_images( image, mask, pars )
% PRE-PROCESS IMAGES
%
% Author: Niki Martinel
% Copyright: Niki Martinel, 2012
%
imgHSV = NM_colorconverter(image, 'RGB', 'HSV');
convertedColorSpaceImagePHOG = NM_channels2image(imgHSV(:,:,1),imgHSV(:,:,2), histeq(imgHSV(:,:,3)));
imgHSV = NM_colorconverter(image, 'RGB', 'HSV');
imgHSV = NM_channels2image(imgHSV(:,:,1),imgHSV(:,:,2), histeq(imgHSV(:,:,3)));
convertedColorSpaceImageSIFT = NM_colorconverter(imgHSV, 'HSV', 'RGB');
imgHSV = NM_colorconverter(image, 'RGB', 'HSV');
convertedColorSpaceImageWGCH = NM_channels2image(imgHSV(:,:,1),imgHSV(:,:,2), histeq(imgHSV(:,:,3)));
imgHSV = NM_colorconverter(image, 'RGB', 'HSV');
imgHSV = NM_channels2image(imgHSV(:,:,1),imgHSV(:,:,2), histeq(imgHSV(:,:,3)));
convertedColorSpaceImageGLCM = NM_colorconverter(imgHSV, 'HSV', 'RGB');
%% ----------------------------------
% Masked images
maskedImagePHOG = NM_immasked( convertedColorSpaceImagePHOG, mask, 0 );
maskedImageGLCM = im2uint8(NM_immasked( convertedColorSpaceImageGLCM, mask, -inf ));
maskedImageSIFT = NM_immasked( convertedColorSpaceImageSIFT, mask, -inf );
maskedImageWGCH = NM_immasked( convertedColorSpaceImageWGCH, mask, -inf );
end