From: ImageAnalyst on
On Mar 28, 9:44 pm, "Sami Oueslati" <Samy...(a)yahoo.fr> wrote:
> Hope it works now:http://drop.io/mqlwmho#
>
> I mean process each region separately

-------------------------------------------------------------
So just find the coordinates of each black bar's row and column. Then
use those to crop out a small subregion and "treat" it as a complete
image. What part is giving you trouble? Finding the bar locations?
Cropping? "Treating"?
From: Walter Roberson on
Sami Oueslati wrote:
> the lines are just one pixel thick, for example the coordinates of
> vetical lines are:
> [17 37 58 82 100 120 145]
>
> and for horizontal are: [24 47 72 93 116 138]
>
> I need strictly parts inside, every rectangular region without lines to
> measure the mean gray level of each one

I have examined your image in fine detail, and your grid lines are NOT
one pixel thick. You can see this clearly near 100, where there is a
tick mark right at a grid line, and the tick mark is definitely thinner
than the grid line. In the horizontal direction, the grid lines seem to
be three pixels thick, and in the vertical direction, they might be four
pixels thick (or perhaps it was just the one I was examining.)

I cropped out the part of the image from the top left corner (0, 0) to
(140, 140), which is the where the bottom-most and right-most tick marks
are. The cropped image was 430 pixels high and 430 pixels wide. This is
just slightly larger than a ratio of one coordinate unit rendering as
three pixels (which would have given 420 x 420). The slight mismatch on
the 3:1 ratio means that you will have to somehow detect the grid lines
instead of just calculating where they should be in the image.

I also examined the pixel values of the image and grid lines, and found
that the grid lines are NOT a solid color. The grid lines are a range of
colors from 0 up to about 19. However, some of the interior image pixels
start from 12. If you select only pixels from 0 to 11 and make the rest
white, then you will not have selected any of the interior pixels, but
some of the grid line pixels would become white. If you set the
threshhold any higher, so that the grid lines become solid, then you
will also be selecting some of the real image pixels.

If you look closely at the image pixels just above the bottom border at
the 100 mark, you will see that there is a blur for a few pixels above
the base. This and the not-quite-regular scale-factor suggests that this
is not a mathematically constructed image, but is instead a scan taken
of either a photograph or a printout, and that when it was converted to
JPEG, the qualify factor was not set sufficiently high. JPEG gets worse
and worse about sharp edges as the quality factor is reduced. This could
also account for _some_ of the difference in pixel values for the grid
lines, but examining the pixels in the 12 to 19 range supports the idea
that there really is some overlap in the pixel values of the image and
the grid. But then again, if it is indeed a scanned image, then
inconsistent illumination could account for some of that.
From: Sami Oueslati on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <def69c42-ddf9-4260-9ddd-a9427134edeb(a)19g2000yqu.googlegroups.com>...
> On Mar 28, 9:44 pm, "Sami Oueslati" <Samy...(a)yahoo.fr> wrote:
> > Hope it works now:http://drop.io/mqlwmho#
> >
> > I mean process each region separately
>
> -------------------------------------------------------------
> So just find the coordinates of each black bar's row and column. Then
> use those to crop out a small subregion and "treat" it as a complete
> image. What part is giving you trouble? Finding the bar locations?
> Cropping? "Treating"?

Hi, I've been absent for a long time, so I resume the subject...

Here's the image: http://drop.io/mqlwmho#

I have the coordinates of the black line that subdivide the image in subregions...My question is how to crop every subregion and how to extract the intensity of the center of each subregion???????????
From: ImageAnalyst on
Just use regular indexing. You can find the rows and columns of the
blanck lines dividing the subimages, can't you? Then do
imageArray = fullSizeImage(row1:row2, col1:col2);
meanGrayValue = mean(imageArray(:));
From: Sami Oueslati on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <6bdc1204-a744-441d-a2c0-4a41e263c768(a)q8g2000vbm.googlegroups.com>...
> Just use regular indexing. You can find the rows and columns of the
> blanck lines dividing the subimages, can't you? Then do
> imageArray = fullSizeImage(row1:row2, col1:col2);
> meanGrayValue = mean(imageArray(:));

Sorry maybe you haven't understand me cause of my poor English...
I know the coordinates of the black lines (I forgot the "s"), I obtained before and constructed the grid in the image...So my intention is to separate every subregion (of the grid) formed by the black lines...and by the way determine the intensity value of the center of each subregion.