How to determine median pixel intensity for each pixel from x number of pictures
조회 수: 12 (최근 30일)
이전 댓글 표시
I am trying to do image processing and have a baseline composed of x number of images with the same dimensions.
I would like to create a single baseline image composed of the median pixel intensity of my baseline images.
I am relatively new to matlab and believe there must be a relatively easy way to do this operation. right now I am considering using a for loop to add pixel (1,1) for each individual picture append it to a list, find the median, add it to a new matrix and move on to pixel (1,2) this is obviously ineffecient and crude.
I would like an efficient script to determine the median pixel value of my each pixel pictures and create a new image composed.
Is there a way to compare the pixel intensity of each pixel for all of the images directly, doing the entire operation in one move?
댓글 수: 0
채택된 답변
Jon
2020년 10월 15일
Suppose your images are each in a mRow by nCol array and you have numImages total number of images. If you put all of the images into an mRow by nCol by numImages array, lets call it X then the baseline image would be given by
xBase = median(X,3)
댓글 수: 2
Jon
2020년 10월 26일
Hi, Looks good. I'm glad you were able to move ahead with this and are able to start figuring out how to do things in MATLAB. If you haven't done it already a good way to get a quick immersion in MATLAB is the MATLAB On Ramp https://www.mathworks.com/learn/tutorials/matlab-onramp.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!