When I select a part of an image and apply a negative function to it, it works 100%:
When trying to apply the same method using another function, the part of image becomes black:
What is the problem and how can I fix it?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
'edited image' is of type uint8 and the selected area which you have taken for processing finally after applying all operations is coming out as type double.But when you place it in original image it is considered as of type uint8 because the image is of type uint8. Hence before putting it in original image you should multiply x by 255 so that it get be properly scaled.