How to construct a feature matrix X where rows correspond to pixels and columns correspond to features?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have converted the image from RGB color space to Lab color space using rgb2lab function.
Now I need to represent each pixel via its Lab color values. Construct a feature matrix X where rows correspond to pixels and columns correspond to features.
Which function I need to use? How can I do that?
댓글 수: 0
답변 (1개)
Image Analyst
2020년 1월 15일
편집: Image Analyst
2020년 1월 15일
What are the features? The lab values? Have you tried just using brackets and parentheses?
labImage = rgb2lab(rgbImage);
lImage = labImage(:,:,1);
aImage = labImage(:,:,2);
bImage = labImage(:,:,3);
featureMatrix = [lImage(:), aImage(:), bImage(:)]
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Modify Image Colors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!