It is getting tricky not to use JAL

found this line giving file name error
require 'media/platimg/',tolower UNAME

change

to

require '~addons/media/platimg/',(tolower UNAME),'.ijs'

and by the way debug is very good.

Have not tried it out in a very long time until now I needed to chase
missing file names

2007/2/22, Oleg Kobchenko <[EMAIL PROTECTED]>:

Convolution and kernel are just other names
for kern&u;.3 which I used to help you google.

Here's a quick process

   load 'media/platimg viewamt'                  NB. using JAL

   img=: 125<16bff bAND readimg 'testdcm.bmp'    NB. image threshold
   viewrgb 16bffffff * img

NB. NOTE: viewrgb preserves image size

NB. copy window and paste to Paint and cut out 24x24 kernel
NB. of the feature and save as kern.bmp
NB.    kern=: 0~:16bff bAND readimg 'kern.bmp'
NB. Here it is done for you

   kern=: #:,".;._2 (0 : 0)
16777215 16777215 16777215 16777215 16777215 16774143 16760959 16744511
16711743 16646175 16646175 16653855 16653855 16649247 16646175 16711743
16744575 16761087 16777215 16777215 16777215 16777215 16777215 16777215
)

   viewrgb 16bffffff * kern

NB. here is the coordinates of the feature in the image
NB. i.e. convolution of img with kernel kern and operation +/@,@:=

   ($ #: (i. >./)@,) (1 1,:$kern) (kern +/@,@:= ]);._3 img
249 236

   load 'plot'
   'surface; mesh 0' plot (1 1,:$kern) (kern +/@,@:= ]);._3 img


--- Björn Helgason <[EMAIL PROTECTED]> wrote:

> Wow!
>
> This is a big help - thanks!
>
> This looks good!
> viewmat 125<16bff bAND readimg 'testdcm.bmp'
>
> I do not understand much of the rest
> I will have to try out and read more about such things
>
> If I understand you correctly then I should read the matrix piece by
piece
> in something like 24 rows and 24 columns at a time and look for the max
> within those steps using +/@,@:=
>
> What is the FVJ book and where can I find it?
>
>
>
>
> 2007/2/22, Oleg Kobchenko <[EMAIL PROTECTED]>:
> >
> > A couple of ideas:
> >
> > Find a threshhold of the image so that it
> > makes good picture of the feature (the dot).
> >
> >    (<./ , >./),16bff bAND readimg 'testdcm.bmp'
> > 120 129
> >    viewmat 125<16bff bAND readimg 'testdcm.bmp'
> >
> > Then apply convolution with a kernel that is
> > a copy of the feature with neighborhood of the
> > size of the feature in all directions, e.g. if dot is
> > 8x8, use 24x24 kernel; and a matching function,
> > e.g. dyadic +/@,@:=  then the max of the convolution
> > will be the sought point.
> >
> > And the FVJ book is an excelent resource.
> >
> >
> > --- Björn Helgason <[EMAIL PROTECTED]> wrote:
> >
> > > I downloaded this just now and paged through the labs.
> > >
> > > It looks very nice and very impressive.
> > >
> > > I do not much about working with images.
> > >
> > > I do have an assignment to work with .bmp images and locate an
> > instrument in
> > > a phantom.
> > > That is a a transparent phantom with four holes around the edges and
one
> > in
> > > the center.
> > > It is round like a clock.
> > > On the .bmp image I can clearly see the black spot where the
instrument
> > is
> > > with the phantom white or rather gray around it.
> > > Around the phantom there is black also.
> > >
> > > I have opened it with transform  image and viewimage as well as with
> > viewbmp
> > > and it looks ok visually but how to operate on it with programs to
find
> > the
> > > spots I do not know how to do.
> > >
> > > I need to find with J where the phantom is located in the image and
then
> > > find the black spot inside the phantom.
> > > getting the x,y coordinates of the leftmost, right, top and bottom
of
> > the
> > > phantom would be ideal and similarly getting the x,y coordinate of
the
> > black
> > > spot inside the phantom circle.
> > >
> > > Can someone point me in a direction how to perform reading like that
> > from a
> > > .bmp image - preferably with with J tools?
> > >
> > > This may be dead easy but for me at the moment it is not.
> > >
> > > I am told people do this with Matlab all the time but I rather try
out
> > with
> > > J if at all possible.
> > >
> > > 2007/1/17, Cliff Reiter <[EMAIL PROTECTED]>:
> > > >
> > > > Just a note that the image3 addon has been updated for J6.01 and
> > > > is available from the wiki jsoftware pages. Directory changed to
> > > > ~addons/media/image3
> > > > Help files for the addon are at
> > > > http://ww2.lafayette.edu/~reiterc/j/image3help/index.html
> > > > if you want to know what the addon does.
> > > >
> > > > Also, a new addon has been added that depends upon the image3;
> > > > The fvj3 addon
> > > > ~addons/graphics/fvj3
> > > > It is primarily meant to provide scripts and materials for the 3rd
> > > > edition of Fractals visualization and J (coming soon),
> > > > but the addon may be of use in its own right, and there are
> > > > several labs, designed to explore the scripts (not book teasers).
> > > > But I have to add a tease since I added a script to the fvj3 addon
> > > > that can be used to replace missing image data (bafrmid.ijs) and
> > > > running the corresponding lab is kind of amusing.
> > > > An illustration of what "replacing missing image data" means can
> > > > be seen at
> > > > http://ww2.lafayette.edu/~reiterc/mvq/bafrmid/index.html
> > > > J is cool.
> > > > Best,
> > > > Cliff
> >
> >
> >
> >
> >
> >
____________________________________________________________________________________
> > Don't pick lemons.
> > See all the new 2007 cars at Yahoo! Autos.
> > http://autos.yahoo.com/new_cars.html
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> Skype: gosiminn, gsm: +3546985532
> Landslags og skrúðgarðagerð, gröfuþjónusta
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari
einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>           /|_      .-----------------------------------.
>          ,'  .\  /  | Með léttri lund verður        |
>      ,--'    _,'   | Dagurinn í dag                     |
>     /       /       | Enn betri en gærdagurinn  |
>    (   -.  |        `-----------------------------------'
>    |     ) |        (\_ _/)
>   (`-.  '--.)       (='.'=)
>    `. )----'        (")_(")
> > ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm





____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
         /|_      .-----------------------------------.
        ,'  .\  /  | Með léttri lund verður        |
    ,--'    _,'   | Dagurinn í dag                     |
   /       /       | Enn betri en gærdagurinn  |
  (   -.  |        `-----------------------------------'
  |     ) |        (\_ _/)
 (`-.  '--.)       (='.'=)
  `. )----'        (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to