From: ImageAnalyst on
Your image is 284 rows or lines by 376 columns.
With your code (before I tacked on the first and end elements), I get
LigneH =
45 133 210 268

LigneV =
17 67 122 176 225 281 342

Now, ligne (the number of lines (rows)) is only 284, so 342 is beyond
that, hence I had to skip those tiles.

It could be that you or me reversed meanings, because you have
ImageGrille(:,LigneV) = 0; %tracer les lignes verticales
ImageGrille(LigneH,:) = 0; %tracer les lignes horizontales
Usually I have V mean "Vertical" and that means in the row direction,
and H means "horizontal" which is in the columns direction. However
you have them in the opposite position, V in the columns position, and
H in the rows position. Maybe you use that definition because the
indexes in the H direction apply for every row in the image and hence
appear as vertical lines even though LigneV actually indicates column
numbers. Anyway, if your H and V are different than my definitions,
if it still works, then fine.

To get a smaller mean, just adjust row1, row2, column1, and column2 in
the loop to get the most central 5x8 chunk of the tile. This is very,
very easy to do and I'm sure you can figure it out.
From: Sami Oueslati on
> To get a smaller mean, just adjust row1, row2, column1, and column2 in
> the loop to get the most central 5x8 chunk of the tile. This is very,
> very easy to do and I'm sure you can figure it out.
----------------------------------------------------------------------------------------------
I meant the center must be 1x1, I've changed the statement like this but it doesn't work:

subImage = ImageGris(row1+(row1+row2)/2:row2-(row1+row2)/2, column1+(column1+column2)/2:column2-(column1+column2)/2);

and last thing how to collect the meanGrayLevels of each center (1x1) in a Matrix (5x8: there's 40 regions) with the same order as the disposition of my regions in the image with grid?
From: ImageAnalyst on
Come on now, this is very, very easy to do - you don't need me to do
that.

The pixel value at some x,y (which is at the center of your subImage
tile) is simply
x = int32((column1 + column2)/2);
y = int32((row1 + row2)/2);
pixelValue = ImageGris(x,y);

then stuff it in an array
center_GrayLevel_Values(counter) = pixelvalues;

I mean, I know you're a beginner but this is really trivial stuff -
not sure where your confusion lies....
From: Sami Oueslati on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <084724db-5d78-41f8-bd94-f8ddebbbe7d5(a)u7g2000vbq.googlegroups.com>...
> Come on now, this is very, very easy to do - you don't need me to do
> that.
>
> The pixel value at some x,y (which is at the center of your subImage
> tile) is simply
> x = int32((column1 + column2)/2);
> y = int32((row1 + row2)/2);
> pixelValue = ImageGris(x,y);
>
> then stuff it in an array
> center_GrayLevel_Values(counter) = pixelValue;
>
> I mean, I know you're a beginner but this is really trivial stuff -
> not sure where your confusion lies....
------------------------------------------------------------------------------------------
Sorry, I know...It's easy for you but for me It's complicated because I'm not used in programming...Hoped that I don't ask for help but due to the short time that I have to finish my work..I feel like incapable to do it fastly..

Last thing and you will not hear about me no more :))...How I put the values obtained in a matrix that has the size (nb of regions in x direction X nb of regions in y direction)??

a thousand thanks!!!


From: Tombo H on
On May 9, 6:30 pm, "Sami Oueslati" <Samy...(a)yahoo.fr> wrote:
How I put the values obtained in a matrix that has the size (nb of
regions in x direction X nb of regions in y direction)??
----------------------------------------------------------------------
I don't understand the question. Can you supply an example?

Do you mean
centralValues(tileY, tileX) = ImageGris(x,y);

??????