Getting set up for vision

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting set up for vision

Dan Farmer
Hello all,

I was tweeting a bit with Serge yesterday morning and decided to give this a shot. I got a Moose 5.0 image and added SciSmalltalk to it. I sort of hit a snag immediately though... 

1. How can I load an image (i.e., a picture -- it turns out Smalltalk's disk images makes Googling for image processing quite suboptimal) and turn it into a DhbMatrix (or treat it as a buffer of bytes, whatever)? 
2. I found one incantation that had to do with an ImageReaderWriter ... openInWorld and then I had a morph that I couldn't figure out how to dispose of, how do you get rid of a morph? Is there a bit of a more "scientific" image viewer object?
3. When I tried loading the NBOpenCV package I got an "IncompatibleLayoutConflict: 'Class with FixedLayout cannot be extended as byte'" error.

So anyway, sorry to introduce myself with a bunch of silly problems. I'm hoping with a little push I can get up to speed and if I like it maybe I can contribute some image processing or computer vision things. I'm currently using Torch7 (luajit) but Smalltalk has always appealed to me with the focus on simplicity and tooling. I don't have a lot of spare time, but I wanted to spend a little seeing if Pharo could speed up my workflow.

Thanks, 
Dan

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting set up for vision

werner kassens-2
Hi Dan,

On Tuesday, January 20, 2015 at 2:12:27 AM UTC+1, Dan Farmer wrote:
1. How can I load an image (i.e., a picture -- it turns out Smalltalk's disk images makes Googling for image processing quite suboptimal) and turn it into a DhbMatrix (or treat it as a buffer of bytes, whatever)? 
there is no automatic method implemented, you'd need to do that by yourself. the data you are looking for are in an object of class Form. the form of a a morph can be retrieved with imageform or something like that. but these general morph questions will be better answered in the pharo user forum.
2. I found one incantation that had to do with an ImageReaderWriter ... openInWorld and then I had a morph that I couldn't figure out how to dispose of, how do you get rid of a morph?
you either open its halo - a graphical user interface- with a shortcut  that i have forgotten, or if you have a handle on it, you send the #delete message. if you then nil that variable (the morph is still there), the morph will get garbage-collected. if you dont have it assigned to a variable you can find it with WhateverImageMorphClassYouUsed>>pointersTo.
Is there a bit of a more "scientific" image viewer object?
no
3. When I tried loading the NBOpenCV package I got an "IncompatibleLayoutConflict: 'Class with FixedLayout cannot be extended as byte'" error.
perhap a bug. i would ask the pharo user forum.


werner

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting set up for vision

Dan Farmer

Ok, looks like I've got a fair amount of work to do to even get started. Still, this is very helpful. Thanks Werner!

On Jan 20, 2015 1:13 AM, "werner kassens" <[hidden email]> wrote:
Hi Dan,

On Tuesday, January 20, 2015 at 2:12:27 AM UTC+1, Dan Farmer wrote:
1. How can I load an image (i.e., a picture -- it turns out Smalltalk's disk images makes Googling for image processing quite suboptimal) and turn it into a DhbMatrix (or treat it as a buffer of bytes, whatever)? 
there is no automatic method implemented, you'd need to do that by yourself. the data you are looking for are in an object of class Form. the form of a a morph can be retrieved with imageform or something like that. but these general morph questions will be better answered in the pharo user forum.
2. I found one incantation that had to do with an ImageReaderWriter ... openInWorld and then I had a morph that I couldn't figure out how to dispose of, how do you get rid of a morph?
you either open its halo - a graphical user interface- with a shortcut  that i have forgotten, or if you have a handle on it, you send the #delete message. if you then nil that variable (the morph is still there), the morph will get garbage-collected. if you dont have it assigned to a variable you can find it with WhateverImageMorphClassYouUsed>>pointersTo.
Is there a bit of a more "scientific" image viewer object?
no
3. When I tried loading the NBOpenCV package I got an "IncompatibleLayoutConflict: 'Class with FixedLayout cannot be extended as byte'" error.
perhap a bug. i would ask the pharo user forum.


werner

--
You received this message because you are subscribed to a topic in the Google Groups "SciSmalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scismalltalk/CgNfhunBEdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Getting set up for vision

werner kassens-2
Hi Dan,
have a look at the 'pixel access' protocol in Form.
werner

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.