From: Zuofeng on
Hi ImageAnalyst,

Thanks very much for clear explanations! Now I know how to generate a patch from certain image. But assigning a patch with certain pattern seems not that easy
because that pattern may be complicated. I have uploaded my image and patterns to http://drop.io. Could you give me some instructions on that? Your comments are very helpful to me!

Thanks again!
Zuofeng



ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <90c0a465-e0b2-49e4-af6b-21a654bbe287(a)v20g2000yqv.googlegroups.com>...
> 1. You have to decide where the "patches" or regions are.
> Thresholding is one way, such as this way to get a binary image of
> where all the pixels with value 4 are:
> % Generate some sample data in the range 0-9.
> a= uint8(10 * rand(8,8))
> % Get a logical array of pixels with a value of 4.
> pixelsOfValue4 = (a == 4);
> Or you could pick a range like
> pixelsOfValue4through6 = (a >= 4) & (a <= 6) ;
>
>
> 2. This demo should explain it:
> % Generate some sample data in the range 0-9.
> a= uint8(10 * rand(8,8))
> % Get a logical array of pixels with a value of 4.
> pixelsOfValue4 = (a == 4);
> % Reassign to 99 instead of 4.
> a(pixelsOfValue4) = 99
From: ImageAnalyst on
Sorry, but I'm not able to browse to the link you supplied. Can you
give it again?
From: Lars on
"Zuofeng " <shang(a)stat.wisc.edu> wrote in message <hlt0ht$ss1$1(a)fred.mathworks.com>...
> Hi ImageAnalyst,
>
> Thanks very much for clear explanations! Now I know how to generate a patch from certain image. But assigning a patch with certain pattern seems not that easy
> because that pattern may be complicated. I have uploaded my image and patterns to http://drop.io. Could you give me some instructions on that? Your comments are very helpful to me!
>

If you are mainly interested in plotting these polygons using different patterns, look here:
<http://www.mathworks.com/matlabcentral/fileexchange/1736-hatched-fill-patterns>

hth
Lars
From: Zuofeng on
Hi,

Actually I have tried the m-file "applyhatch.m", it seems that the patterns are predetermined by this file, i.e., I cannot choose patterns by myself.
I also tried to revise this file so that my own patterns could be applied but didn't figure out how to do that. It seems that I should define mypatterns in the file
"makehatch", am I right?

Thanks!
Zuofeng

"Lars " <lars.barring(a)myworkplace.se> wrote in message <hlu0pk$t5j$1(a)fred.mathworks.com>...
> "Zuofeng " <shang(a)stat.wisc.edu> wrote in message <hlt0ht$ss1$1(a)fred.mathworks.com>...
> > Hi ImageAnalyst,
> >
> > Thanks very much for clear explanations! Now I know how to generate a patch from certain image. But assigning a patch with certain pattern seems not that easy
> > because that pattern may be complicated. I have uploaded my image and patterns to http://drop.io. Could you give me some instructions on that? Your comments are very helpful to me!
> >
>
> If you are mainly interested in plotting these polygons using different patterns, look here:
> <http://www.mathworks.com/matlabcentral/fileexchange/1736-hatched-fill-patterns>
>
> hth
> Lars
From: Zuofeng on
Hi,

I have sent them through an email to imageanalyst(a)mailinator.com with my images.
Thanks a lot for valuable suggestions!

Zuofeng

ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <60aeb72c-2412-4f6a-bcd1-5dca5590368f(a)b2g2000yqi.googlegroups.com>...
> Sorry, but I'm not able to browse to the link you supplied. Can you
> give it again?