matlab - <ask> how to fix reshape error -


btw have sample code :

[img_rgb, clrmap] = imread ('e:\foto\c360_2015-02-02-14-15-52-544.jpg'); [rows,columns,numclrchannels] = size(img_rgb);            img_hsv = rgb2hsv(img_rgb); h_img=img_hsv(:,:,1); s_img=img_hsv(:,:,2); v_img=img_hsv(:,:,3);  nsteps = 3;  [center,u,obj_fcn]=fcm(h_img,nsteps); [~,cluster_idx] = max(u);    subplot(1,2,1); imshow (img_hsv); subplot(1,2,2); imshow (v_mask,[]); pixel_labels = reshape(cluster_idx,rows,columns); imshow(cluster_idx,[]), title('image labeled cluster index'); 

i want label every cluster created on hsv image processed fcm function.

but problem have error on displaying output of pixel_label saying :

error using reshape reshape number of elements must not change. 

is there other way display hsv output image after hsv image has been processed fcm function properly? how fix error?

thx before.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -