View Single Post
Old 19th August 2013, 22:19   #11  |  Link
martin53
Registered User
 
Join Date: Mar 2007
Posts: 407
StainlessS,
there is a thing that I don't understand at the moment. With the following lines and constants
Code:
/*
ymin = 255 #user parameter
ymax = 255 #user parameter
border = 0 #user parameter
dx = clip.width
dy = clip.height
p = 6

cMGamut = c.YTo8() #in my situation also 0 for disallowed pixels in contrast to the simplified example here

cR = c.ConvertToRGB.ShowRed(pixel_type="Y8")

Rmax = cR.MYPlaneMax(cMGamut, x=border, y=border, w=dx, h=dy, MaskMin=1, MaskMax=255)
R_ = cR.MYPNorm(cMGamut, x=border, y=border, w=dx, h=dy, d=255, p=power, MaskMin=max(min(ymin, Rmax-10),0), MaskMax=ymax)
I get Rmax == 255, but R_ == -1.
When I measure Rmax before, so I get the max brightness of the masked pixels, shouldn't I get with MaskMin = Rmax-10, and MaskMax = 255 at least 1 pixel?
martin53 is offline   Reply With Quote