On 2015-04-23 at 09:01:14 -0600, Craig DeForest wrote:
> Separating the spots on a single image is something you can do by explicit 
> slicing, or you can try to get fancy.  Here’s one way to get fancy, by using 
> a convolution to estimate the total number of masked points within a given 
> radius.  It’s very wasteful of CPU cycles, but quick to code up — which fits 
> within the philosophy of PDL.  
> 

Ignore my e-mail about using clustering algorithms... Craig's e-mail
reminded my that you can do blob extraction in one-pass using
<https://en.wikipedia.org/wiki/Connected-component_labeling#One-pass_version>.
There's some C code at 
<http://www-sop.inria.fr/members/Gregoire.Malandain/segment/connexe.html>,
but I haven't used it.

Cheer,
- Zaki Mughal

> 
> 
>       
> 
> 
> > On Apr 23, 2015, at 8:24 AM, Demian Riccardi <[email protected]> 
> > wrote:
> > 
> > 
> > Thanks, Craig.
> > 
> > Ideally, I would like to automatically fit a two gaussian to each blob, and 
> > integrate it to get the total relative contents of the blobs, which I could 
> > then connect back with the known amount of standards added.  For starters I 
> > was able to read in the file using PDL::IO::Image (awesome) and rimage. I 
> > tried using PDL::IO::Pic rim, but that spit out an error for some reason.
> > 
> > I sliced each column of the image and printed out the minimum value of the 
> > image unit (RGB value? sorry, I’m not an expert in manipulating images!).  
> > This spit out something that looked somewhat reasonable when graphed.  
> > Thus, I should be able to grab out the index of the minimum paired with a 
> > column to fit a the gaussian, but it there an easier way to do this?
> > 
> > I’m still a PDL newbie, so even slicing is not trivial for me at this 
> > point… bah!
> > 
> > Demian
> > 
> > below is a copy paste from an IPerl Notebook (I hope it translates!).
> > 
> > 
> > In [31]:
> > 
> > use Modern::Perl;
> > use PDL;
> > use PDL::IO::Image;
> > In [32]:
> > 
> > my $pdl1 = rimage('Desktop/TLC_arg.jpg');
> > print $pdl1->info;
> > Out[32]:
> > PDL: Byte D [2625,116,3]
> > 1
> > In [37]:
> > 
> > foreach my $ic (0 .. 2624){
> >     my $col = min($pdl1->slice("$ic"));
> >     print $col . "\n";
> > }
> > 
> > 
> >> On Apr 23, 2015, at 9:34 AM, Craig DeForest <[email protected] 
> >> <mailto:[email protected]>> wrote:
> >> 
> >> How do you want to quantify them?  E.g. are you doing photometry or are 
> >> you doing geometry?  PDL can help you either way.  The “rim” function will 
> >> load a color image (say a PNG or JPG) into a structured array.  After that 
> >> you can manipulate it.  Simple geometric extraction or brightness 
> >> extraction are easy after that.  
> >> 
> >> 
> >> 
> >>> On Apr 22, 2015, at 2:14 PM, Demian Riccardi <[email protected] 
> >>> <mailto:[email protected]>> wrote:
> >>> 
> >>> Hello, 
> >>> 
> >>> A need has come up for analyzing some thin layer chromatography in one of 
> >>> my chemistry labs (see the attached jpg; I know it isn’t perfect). Is 
> >>> there a way I can pull in this image and automatically quantify the 
> >>> spots?  Two of the sets of four are standards and the other two are 
> >>> samples.
> >>> 
> >>> I was able to load it in with PDL::IO::Image so I know there must be a 
> >>> way!
> >>> 
> >>> Demian
> >>> 
> >>> <TLC_arg.jpg>
> >>> ------------------------------------------------------------------------------
> >>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> >>> Develop your own process in accordance with the BPMN 2 standard
> >>> Learn Process modeling best practices with Bonita BPM through live 
> >>> exercises
> >>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- 
> >>> <http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-> 
> >>> event?utm_
> >>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF_______________________________________________
> >>> pdl-general mailing list
> >>> [email protected] 
> >>> <mailto:[email protected]>
> >>> https://lists.sourceforge.net/lists/listinfo/pdl-general
> >> 
> > 
> 

> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF

> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to