Re: change color in a bmp image
- From: "kudrah " <elzarogia@xxxxxxxx>
- Date: Sun, 3 May 2009 00:07:01 +0000 (UTC)
dpb <none@xxxxxxx> wrote in message <gtimj4$v87$1@xxxxxxxx>...
kudrah wrote:To be honest i didn't exactly get what you mean! :)
...
...
a for loop (two for loops) one for each dimension of rows and
columns of the array but it changes other pixels as well apart from
those i want chaged.
Well, as shown above, "the Matlab way" is to use array indexing and
other vectorized notation as much as possible...
...
... the for loop I use is :> for i=1:11000;
> for j=1:11000;
image(rows(i),columns(j))=0;
end
end
Normally,that would produce the same white image,but with 11000 black
pixels in the specified areas.But when i use imagesc to get the
picture of the image,that doesn't look right and also when I use find
function to check the number of black pixels,it gives far more black
pixels than it should,which is 11000. Any ideas what i do wrong?
What are the arrays rows/columns?
If they're the indices to be modified as appears, then what you really
probably need it to look at ind2sub and friends.
You're changing 11000^2 = 121E6 locations this way.
--Row and columns are the two arrays that i take after i split the first array K.
.
- Follow-Ups:
- Re: change color in a bmp image
- From: dpb
- Re: change color in a bmp image
- References:
- change color in a bmp image
- From: kudrah
- Re: change color in a bmp image
- From: dpb
- Re: change color in a bmp image
- From: kudrah
- Re: change color in a bmp image
- From: dpb
- change color in a bmp image
- Prev by Date: Re: swapping/rotating element of a vector (basic question)
- Next by Date: Re: change color in a bmp image
- Previous by thread: Re: change color in a bmp image
- Next by thread: Re: change color in a bmp image
- Index(es):
Relevant Pages
|