Follow on Facebook

header ads

How to find average X, Y, Z from XYZ image?

In this post, i will show you how to find x,y,z from xyz image. for more understand see below code.

clear;
close all;
clc;

 img = imread('C:\Users\US\Desktop\CompVision\images\lenna.jpg');
 %imresize(img,[200 200]);
 img = rgb2xyz(img);
 figure('units','normalized','outerposition',[0 0 1 1]),
 subplot(221), imshow(img), title('Lenna Image');

 [r, c, ch] = size(img);
 img_x =img(:,:,1);
 subplot(222), imshow(img_x), title('Channel x');
 img_y =img(:,:,2);
 subplot(223), imshow(img_y), title('Channel y');

 img_z =img(:,:,3);
 subplot(224), imshow(img_z), title('Channel z');







Post a Comment

0 Comments