{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

interpolate - between four different mappings in order to...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function [subImage] = interpolate(subBin,LU,RU,LB,RB,XSize,YSize) % pImage - pointer to input/output image % uiXRes - resolution of image in x-direction % pulMap* - mappings of greylevels from histograms % uiXSize - uiXSize of image submatrix % uiYSize - uiYSize of image submatrix % pLUT - lookup table containing mapping greyvalues to bins % This function calculates the new greylevel assignments of pixels within a submatrix % of the image with size uiXSize and uiYSize. This is done by a bilinear interpolation
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % between four different mappings in order to eliminate boundary artifacts. % It uses a division; since division is often an expensive operation, I added code to % perform a logical shift instead when feasible. % subImage = zeros(size(subBin)); num = XSize * YSize; for i = 0:XSize-1 inverseI = XSize - i; for j = 0:YSize-1 inverseJ = YSize - j; val = subBin(i+1,j+1); subImage(i+1,j+1) = fix((inverseI*(inverseJ*LU(val) + j*RU(val)) . .. + i*(inverseJ*LB(val) + j*RB(val)))/num); end end e...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern