Possible Duplicate:
Python (creating a negative of this black and white image)
Hi,
I am trying to create a negative of this black and white image. The opposite of white (255) is black (0) and vice versa. The opposite of a pixel with a value of 100 is 155. I cannot use convert, invert, point, eval, lambda.
Here is my code but...
So say I have an image that I want to "pixelate". I want this sharp image represented by a grid of, say, 100 x 100 squares. So if the original photo is 500 px X 500 px, each square is 5 px X 5 px. So each square would have a color corresponding to the 5 px X 5 px group of pixels it swaps in for...
How do I figure out what this one color...
I am using Octave to analyze some images. Now I use two nested for-loops to access every pixel but this is really slow.
My code is something like that:
for i = 1:size(im,1)
for j = 1:size(im,2)
p = im(i,j,1:3);
if (classRGB(class, [p(1),p(2),p(3)]) > 0)
## Apply some function to that pixel here
endi...