필터 지우기
필터 지우기

divide RGB color space into 16x16x16 bins

조회 수: 1 (최근 30일)
Elysi Cochin
Elysi Cochin 2018년 1월 3일
답변: Guillaume 2018년 1월 3일
How to divide RGB color space into 16x16x16 bins.
And then calculate the number of the bins, into which there are pixels to be divided
  댓글 수: 1
KSSV
KSSV 2018년 1월 3일
YOu must have a look on reshape, blockproc.

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2018년 1월 3일
Assuming your image is of type double (i.e: intensity range is 0-1), then:
bins = linspace(0, 1, 16); %if image is uint8, then linspace(0, 255, 16)
bincoords = discretize(rgbimage, bins);
bincoords(row, col, :) is a 3 element vector giving you the location of pixel(row, col) into that 16x16x16 histogram cube. If you want to change that into linear indices:
bincoordslinear = sub2ind([16 16 16], bincoords(:, :, 1), bincoords(:, :, 2), bincoords(:, :, 3));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by