0
사용자 입력에 의해 결정된 범위 내의 평균 픽셀 색상을 사용하여 전체 그림의 화이트 밸런스를 변경하고 싶습니다. startX
, endX
, startY
및 endY
이라는 변수를 사용하고 있습니다.특정 범위 내의 색상 평균
하나의 픽셀 좌표에서 처리했지만 그 범위 내의 픽셀의 평균값이 아닙니다. greyValue
은 색상 평균을 반환하는 방법을 모르기 때문에 멈추는 곳입니다.
def whiteBalanceBonus():
File=pickAFile()
myPict=makePicture(File)
startX=requestInteger("Enter the value of the first 'X' Coordinate in the range")
startY=requestInteger("Enter the value of the first 'Y' Coordinate in the range")
endX=requestInteger("Enter the value of the last 'X' Coordinate in the range")
endY=requestInteger("Enter the value of the last 'Y' Coordinate in the range")
for x in range(startX,endX):
for y in range(startY,endY):
pixel=getPixel(myPict,x,y)
greyValue=