"Rafal " <firstname.lastname@example.org> wrote in message news:email@example.com... > Hello, > How can I change the background in my .jpg from for example: grey to white > without change photographed object? > > Assume that I click on the image and select the background (level of > greyness) > > L1 = imread('image.jpg'); > L1 = double(L1)/255; > imshow(L1) > [x,y]=ginput(1); > y=round(y); > x=round(x); > p = L1(y,x,: ); ... > .. > .. > I have no idea what is next :/ >
I am NOT an image processing expert. But you may want to do something like a replace pixels "near" that color - unless some of the object also has that color. Then you might try to fill that region instead. But to do so, you would first have to convert to black and white - fill and find what was filled, then transform back to color. Not sure how you find which pixels were updated in B&W except by comparing before and after.