Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3935 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-07-24 00:25 +0000 |
| Last post | 2011-07-29 12:05 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Code is not working... Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-24 00:25 +0000
Re: Code is not working... Jay Bee <jiri.bocan@gmail.com> - 2011-07-24 11:39 +0000
Re: Code is not working... Dilek <genetik08@gmail.com> - 2011-07-29 12:05 +0000
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-07-24 00:25 +0000 |
| Subject | Re: Code is not working... |
| Message-ID | <j0foq7$8ov$1@smc.vnet.net> |
If you want any useful help you'll probably need to give a bit more
information. For example, what are
image, RegionGrowing and imgfilter? And what is the function of
imageFilled (it doesn't seem to do anything
at the moment)?
Heike.
On 23 Jul 2011, at 00:47, =?iso-8859-1?Q?S=F6nmezer@smc.vnet.net wrote:
>
> Hello,
>
> I am in trouble with below codes:
>
> I run this code but Program is not finsh evertime It is running and running...
> Could you possible help me.
>
> dim = Dimensions[image]
> r = 1;
> k = 1;
> n = 10;
> cost = Function[{positionValues, neighborValues},
> First[neighborValues] == 1];
>
> (* Image that only contains the value zero *)
> imageNew = Table[0, {i, 1, dim[[1]]}, {j, 1, dim[[2]]}];
>
> (* Walk through the rows of the image *)
> While[r < dim[[1]],
> (* Walk through the columns of the image*)
> k = 1;
> While[k < dim[[2]],
> (* Find a white pixel*)
> If[imgfilter[[r, k]] == 1,
> (* Proceed RegionGrowing and give them a identical value by \
> multiplying it with n *)
> region = RegionGrowing[{imgfilter}, {{r, k}}, 1, cost]*n;
> (* Add the identical cell to imageNew *)
> imageNew = imageNew + region;
> (* Change n, so each cell has a different value *)
> n = n + 2;
> (* Take the cell out of the original image,
> so he will stop when there is no white pixel anymore *)
> imageFilled = imgfilter - region;
> ];
> k++;
> ];
> r++;
> ];
>
>
[toc] | [next] | [standalone]
| From | Jay Bee <jiri.bocan@gmail.com> |
|---|---|
| Date | 2011-07-24 11:39 +0000 |
| Message-ID | <j0h090$dgi$1@smc.vnet.net> |
| In reply to | #3935 |
On Jul 24, 1:25 am, Heike Gramberg <heike.gramb...@gmail.com> wrote:
> If you want any useful help you'll probably need to give a bit more
> information. For example, what are
> image, RegionGrowing and imgfilter? And what is the function of
> imageFilled (it doesn't seem to do anything
> at the moment)?
>
> Heike.
>
> On 23 Jul 2011, at 00:47, =?iso-8859-1?Q?S=F6nme...@smc.vnet.net wrot=
e:
>
>
>
>
>
>
>
>
>
> > Hello,
>
> > I am in trouble with below codes:
>
> > I run this code but Program is not finsh evertime It is running and run=
ning...
> > Could you possible help me.
>
> > dim = Dimensions[image]
> > r = 1;
> > k = 1;
> > n = 10;
> > cost = Function[{positionValues, neighborValues},
> > First[neighborValues] == 1];
>
> > (* Image that only contains the value zero *)
> > imageNew = Table[0, {i, 1, dim[[1]]}, {j, 1, dim[[2]]}];
>
> > (* Walk through the rows of the image *)
> > While[r < dim[[1]],
> > (* Walk through the columns of the image*)
> > k = 1;
> > While[k < dim[[2]],
> > (* Find a white pixel*)
> > If[imgfilter[[r, k]] == 1,
> > (* Proceed RegionGrowing and give them a identical value by \
> > multiplying it with n *)
> > region = RegionGrowing[{imgfilter}, {{r, k}}, 1, cost]*n;
> > (* Add the identical cell to imageNew *)
> > imageNew = imageNew + region;
> > (* Change n, so each cell has a different value *)
> > n = n + 2;As
> > (* Take the cell out of the original image,
> > so he will stop when there is no white pixel anymore *)
> > imageFilled = imgfilter - region;
> > ];
> > k++;
> > ];
> > r++;
> > ];
As Heike asked, what are those functions you use? If the computation
lasts forever, there must be some bug... Check all braces - correct
number and position, if all the inputs and outputs have an expected
format, and so on...
[toc] | [prev] | [next] | [standalone]
| From | Dilek <genetik08@gmail.com> |
|---|---|
| Date | 2011-07-29 12:05 +0000 |
| Message-ID | <j0u7lp$fbr$1@smc.vnet.net> |
| In reply to | #3951 |
On 24 Temmuz, 07:39, Jay Bee <jiri.bo...@gmail.com> wrote:
> On Jul 24, 1:25 am, Heike Gramberg <heike.gramb...@gmail.com> wrote:
>
>
>
>
>
> > If you want any useful help you'll probably need to give a bit more
> > information. For example, what are
> > image, RegionGrowing and imgfilter? And what is the function of
> > imageFilled (it doesn't seem to do anything
> > at the moment)?
>
> > Heike.
>
> > On 23 Jul 2011, at 00:47, =?iso-8859-1?Q?S=F6nme...@smc.vnet.net wr=
ot=
> e:
>
> > > Hello,
>
> > > I am in trouble with below codes:
>
> > > I run this code but Program is not finsh evertime It is running and r=
un=
> ning...
> > > Could you possible help me.
>
> > > dim = Dimensions[image]
> > > r = 1;
> > > k = 1;
> > > n = 10;
> > > cost = Function[{positionValues, neighborValues},
> > > =C2 First[neighborValues] == 1];
>
> > > (* Image that only contains the value zero *)
> > > imageNew = Table[0, {i, 1, dim[[1]]}, {j, 1, dim[[2]]}];
>
> > > (* Walk through the rows of the image *)
> > > While[r < dim[[1]],
> > > =C2 (* Walk through the columns of the image*)
> > > =C2 k = 1;
> > > =C2 While[k < dim[[2]],
> > > =C2 (* Find a white pixel*)
> > > =C2 If[imgfilter[[r, k]] == 1,
> > > =C2 =C2 (* Proceed RegionGrowing and give them a identical value=
by \
> > > multiplying it with n *)
> > > =C2 =C2 region = RegionGrowing[{imgfilter}, {{r, k}}, 1, cost]=
*n;
> > > =C2 =C2 (* Add the identical cell to imageNew *)
> > > =C2 =C2 imageNew = imageNew + region;
> > > =C2 =C2 (* Change n, so each cell has a different value *)
> > > =C2 =C2 n = n + 2;As
> > > =C2 =C2 (* Take the cell out of the original image,
> > > =C2 =C2 so he will stop when there is no white pixel anymore *)
> > > =C2 =C2 imageFilled = imgfilter - region;
> > > =C2 =C2 ];
> > > =C2 k++;
> > > =C2 ];
> > > =C2 r++;
> > > =C2 ];
>
> As Heike asked, what are those functions you use? If the computation
> lasts forever, there must be some bug... Check all braces - correct
> number and position, if all the inputs and outputs have an expected
> format, and so on...- Al=C4=B1nt=C4=B1y=C4=B1 gizle -
>
> - Al=C4=B1nt=C4=B1y=C4=B1 g=C3=B6ster -
Thank you for your answers. But There is a problem too that I don't
know how must I give inform about the region growing function.
Could you possible say me how can I do it?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web