image - how to find low element from 3 dimension array -


when read color image information data in rows x cols x 3(rgb color)

i want extract min value separate color

originally

r = i(:,:,1); g = i(:,:,2); b = i(:,:,3); 

to extract separate data color , find min by

rmin = min(r(:)); 

and on...

but there proper solution use min?

i tried

min(i(:,:,1:3)); 

but didn't right (dimension answer 1xcolx3 : should 1x3)

my guess have use nested min. example use following command

min(min(i, [], 1), [], 2) 

this should give result want.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -