function rvi_value = get_rvi_value(uid,day)
rvi_name = strcat(uid, '/');
rvi_name = strcat(rvi_name,day);
    rvi_name = strcat(rvi_name,'_rvi.png');
    rvi_img = imread(rvi_name);
	size_i = size(rvi_img);
    pixel_num = size_i(1)*size_i(2);
    pixel_array = zeros(size_i(1), size_i(2));
    rvi_value = 0;

	
	for i = 1:size_i(1)
        for j = 1:size_i(2)
		pixel_value = rvi_img(i,j,:);
	%	pixel_value(1)
	%	pixel_value(2)
	%	pixel_value(3)
        if pixel_value(1) >= 171 && pixel_value(2) <= 5 && pixel_value(3) <= 53
            rvi_value = rvi_value+0.1;
            pixel_array(i,j) = 0.1;
		elseif pixel_value(1) >= 234 && pixel_value(2) <= 79 && pixel_value(3) <= 59
			rvi_value = rvi_value + 0.2;
            pixel_array(i,j) = 0.2;
		elseif pixel_value(1) >= 247 && pixel_value(2) <= 136 && pixel_value(3) <= 90
		    rvi_value = rvi_value+0.3;
            pixel_array(i,j) = 0.3;
		elseif pixel_value(1) >= 251 && pixel_value(2) <= 192 && pixel_value(3) <= 126
		    rvi_value = rvi_value + 0.4;
            pixel_array(i,j) = 0.4;
		elseif pixel_value(1) == 255 && pixel_value(2) <= 240 && pixel_value(3) <= 181
		    rvi_value = rvi_value + 0.5;
            pixel_array(i,j) = 0.5;
		elseif pixel_value(1) <= 230 && pixel_value(2) <= 243 && pixel_value(3) <= 164
		    rvi_value = rvi_value + 0.6;
            pixel_array(i,j) = 0.6;
		elseif pixel_value(1) <= 186 && pixel_value(2) >= 227 && pixel_value(3) <= 131
		    rvi_value = rvi_value + 0.7;
            pixel_array(i,j) = 0.7;
		elseif pixel_value(1) <= 129 && pixel_value(2) >= 191 && pixel_value(3) <= 108
            rvi_value = rvi_value + 0.8;
            pixel_array(i,j) = 0.8;
		elseif pixel_value(1) <= 17 && pixel_value(2) >= 167 && pixel_value(3) <= 95
		    rvi_value = rvi_value + 0.9;
            pixel_array(i,j) = 0.9;
		else
			ss = 1;
		end
	end
	%pixel_num
	%rvi_value
    rvi_value = 10*rvi_value/pixel_num

end
