Multiply image with vector
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello is there a function in Matlab where I could multiply an NxM image with a vector ?
I would do something like this :
>> vec = [1,2,3];
>> vec = reshape(vec,[1,1,3]);
>> img = [1,1;1,1];
>> imgrgb = dimmulty(3,vec,img);//imgrgb is a 2x2x3 image
What I am searching is the dimmulty function !
댓글 수: 0
채택된 답변
Sean de Wolski
2014년 9월 3일
편집: Sean de Wolski
2014년 9월 3일
bsxfun does exactly that :)
>> bsxfun(@times,vec,img)
(I use this really frequently for applying operations to RGB images)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!