From: david carollo on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <a00c4b57-0c12-4065-9099-0ebe70bfeef2(a)i10g2000yqh.googlegroups.com>...
> On May 3, 7:02 am, "david carollo" <xdav...(a)gmail.com> wrote:
> > My database is very large, I need a function wich automatically extract the H,S & V mean value and get them in an array..How I can do that?
> > The story of 10 branches because my system must does a non-linear research in the database (for computational issues).
> >
> > Thank you!
>
> -----------------------------------------------------------------------------------------
> david:
> I showed you how to get the mean hsv in post #10 in this thread:
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/280874#741300
>
> Obviously the only thing you need to do is to make the means be an
> array and put them inside a for loop - a trivial step. If you need
> help making a variable inside a loop an array, then you'll need to
> take a lot more training before tackling this project because that's
> about as easy as it gets. In other words, it's so basic to turn
>
> hMean = mean(hImage(:));
>
> into
>
> for k = 1:numberOfImages
> hmean(k) = mean(hImage(:));
> end
>
> that I'm not even really sure if this is what you're asking.
>
> And I still don't understand your comment on branches, but that
> doesn't have anything to do with calculating the means of the images.
> Maybe it's because it's impossible to explain something lin two lines
> (about what your posts average). Your posts should be longer than
> mine because it's your project and you know the most about it, plus it
> shows us you're serious about putting the effort into solving your
> problem. And I expect you should be willing to put more time into
> your project than I should.
> -ImageAnalyst


Ok..what you tell me it's true..but I never programming and learn this for me is very difficult..and my English also! :) but I try to do it..the story of branches and want to have my database divided in several sub-database is because my teacher want a non-linear search for the mechanism of the match..in other words..f..I divide my big images in N tiles..for every tile I can have the three mean values of HSV..

for example 0.15 0.62 0.79

to put in this tile the better match (the more similar image) I have to compare this three values with 32.000 values to take the best..If I choose for divided my database in X sub-database and I choose as way to do that the V values I can have 10 sub-database (in the first all images have V in 0 to 0.1, second the images have V in 0.1 to 0.2, etc)..If I have to match the example matrix I would to make a mechanism to go directly in the seven sub-database to find its best match (it's 0.79) and match only with the images have value since 0.7 to 0.8.It's faster, no?
I hope you can understand..

Now I want to understand how to make the vector with the color and texture value but I search on the Web and at now I cannot find informations to how to make it..but the really priority is to make the non-linear mechanism of the matching..this project is very hard for me but I must to try it before June..I hope :)

Thank you very much to help me, you are very friendly...
From: ImageAnalyst on
david:
I'm no database expert but I do know that a database with only 32000
records is a tiny database and since databases are highly optimized
when handling queries, it should be no problem at all for your
database program to return all 32000 V values in one array. So I
don't really understand the wisdom of having 10 databases and then
having to pick the right database to query for such a small expected
return variable. I think if you return all 32000 V values, or just
3200 values, or just 10 values in a certain range from either size
database (32000 or 3200 records) it just won't make a whole lot of
difference in time. But if your teacher wants you to have them in 10
databases instead of 1, then do it, because he may want you to learn
something special that I'm not aware of.

I showed you how to make the vector of H means with the hmean array in
the loop above. You just do the same for S and V. If you want a 2D
array with columns for H, S, and V, and where each row is a tile, then
you can do
for k = 1:numberOfImages
hmean(k) = mean(hImage(:));
smean(k) = mean(sImage(:));
vmean(k) = mean(vImage(:));
end
SHVMeans = [hmean, smean, vmean];
This would be for the small images that go into making up the big
image. For the big image, the loop would be over the tiles, instead
over the number of images. You could use blockproc to scan all the
tiles of the big image.

From: david carollo on
And what about the mechanism to put automatically the "best match database images" in the tile of my big image?
Maybe I don't tell you that:in my exam i don't have only to give the final image, but i have to run the program in real-time in front of my teacher, for the input i choose an image and for the output i want to have the original big image near the new mosaic big image.

It's not the problem of get the 32.000 values in the array, the problem i think is about the compare for every tile 32.000 3-values of the database images.Then, if I have 10 bases I think it can be too faster, no?

Today I take "Digital Image Processing using Matlab" and I start to read it..

Ps:this is a difficult question:how to don't reply the images in may tiles of the big image?how to have the images in at maximum one tile?

Goodnight
From: david carollo on
Ps:Why blockproc Read/Write File Formats: TIFF ?
My images are Jpg..need to transform?
From: ImageAnalyst on
On May 6, 7:52 pm, "david carollo" <xdav...(a)gmail.com> wrote:
> Ps:Why blockproc Read/Write File Formats: TIFF ?
> My images are Jpg..need to transform?
------------------------------------------------------------------------------------
I don't know but it doesn't matter. Just read in your image with
imread, like this example in the help for blockproc() where they did
it for a PNG format image:

I = imread('pears.png');
I2 = blockproc(I,[100 100],fun);