DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 16 Jul 2007 10:10:04 -0700,    posted on: microsoft.public.dotnet.framework.drawing        back       

Thread Index
  1    ohs
          2    Bob Powell [MVP]
                 3    ohs
                 4    SharpCoderMP M
                 5    ohs
                 6    Andrew Brook


Sparkling Lasoo Wand Tool !   
I'm looking for a way to 'Lasoo' a section of an image.

Similar to the sparkling wand mask tools in Photoshop and the likes...

Hopefully to return a region object. 

Any pointers ?

 

 

Any ideas ?
Date:Mon, 16 Jul 2007 10:10:04 -0700   Author:  

Re: Sparkling Lasoo Wand Tool !   
The accumulation of the points would be done in the classic way. See various 
implementations of Scribble C#.

The "marching ants" lasso can be drawn using a GraphicsPath taken from the 
points gathered and using a custom brush that changes the custom dash 
pattern a fwe times a second.

-- 
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"ohs"  wrote in message 
news:75A525D0-FB3A-4C64-918D-3B45BBEB09D5@microsoft.com...

> I'm looking for a way to 'Lasoo' a section of an image.
>
> Similar to the sparkling wand mask tools in Photoshop and the likes...
>
> Hopefully to return a region object.
>
> Any pointers ?
>
>
>
>
>
> Any ideas ?
> 
Date:Mon, 16 Jul 2007 20:53:57 +0200   Author:  

Re: Sparkling Lasoo Wand Tool !   
The 'Classic Way' ?
What / where is Scribble C# ?  Do you mean the MS freehand drawing demo ?

Sorry don't think my original post was clear... the key was in the 
'sparkling wand'.

I didn't want to elaborate incase I steered the response in the wrong 
direction.

What I need is the functionality of a tool that when clicked on an point on 
an image 'lasoos' a Region of similar coloured pixels (possibley with some 
form of edge detection).

A basic implementation would be to create a Region from a blue circle (of 
unknown location and dimension) on a green background.

Ultimately I would like to be able to tune the detection parameters to mask 
a photographic object, say a face in a portrait.

Does that make more sense ?


"Bob Powell [MVP]" wrote:


> The accumulation of the points would be done in the classic way. See various 
> implementations of Scribble C#.
> 
> The "marching ants" lasso can be drawn using a GraphicsPath taken from the 
> points gathered and using a custom brush that changes the custom dash 
> pattern a fwe times a second.
> 
> -- 
> Bob Powell [MVP]
> Visual C#, System.Drawing
> 
> Ramuseco Limited .NET consulting
> http://www.ramuseco.com
> 
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
> 
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
> 
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
> 
> 
> 
> "ohs"  wrote in message 
> news:75A525D0-FB3A-4C64-918D-3B45BBEB09D5@microsoft.com...
> > I'm looking for a way to 'Lasoo' a section of an image.
> >
> > Similar to the sparkling wand mask tools in Photoshop and the likes...
> >
> > Hopefully to return a region object.
> >
> > Any pointers ?
> >
> >
> >
> >
> >
> > Any ideas ?
> > 
> 
> 
> 
Date:Tue, 17 Jul 2007 02:06:04 -0700   Author:  

Re: Sparkling Lasoo Wand Tool !   
take a look at code behind paint.net - guys did great job there, you can
find lots of inspiration as the source code is made public available.
though i imagine you may get a bit confused when you first time take a
look at their code ;)

ohs wrote:

> The 'Classic Way' ?
> What / where is Scribble C# ?  Do you mean the MS freehand drawing demo ?
> 
> Sorry don't think my original post was clear... the key was in the 
> 'sparkling wand'.
> 
> I didn't want to elaborate incase I steered the response in the wrong 
> direction.
> 
> What I need is the functionality of a tool that when clicked on an point on 
> an image 'lasoos' a Region of similar coloured pixels (possibley with some 
> form of edge detection).
> 
> A basic implementation would be to create a Region from a blue circle (of 
> unknown location and dimension) on a green background.
> 
> Ultimately I would like to be able to tune the detection parameters to mask 
> a photographic object, say a face in a portrait.
> 
> Does that make more sense ?
> 
> 
> "Bob Powell [MVP]" wrote:
> 
>> The accumulation of the points would be done in the classic way. See various 
>> implementations of Scribble C#.
>>
>> The "marching ants" lasso can be drawn using a GraphicsPath taken from the 
>> points gathered and using a custom brush that changes the custom dash 
>> pattern a fwe times a second.
>>
>> -- 
>> Bob Powell [MVP]
>> Visual C#, System.Drawing
>>
>> Ramuseco Limited .NET consulting
>> http://www.ramuseco.com
>>
>> Find great Windows Forms articles in Windows Forms Tips and Tricks
>> http://www.bobpowell.net/tipstricks.htm
>>
>> Answer those GDI+ questions with the GDI+ FAQ
>> http://www.bobpowell.net/faqmain.htm
>>
>> All new articles provide code in C# and VB.NET.
>> Subscribe to the RSS feeds provided and never miss a new article.
>>
>>
>>
>> "ohs"  wrote in message 
>> news:75A525D0-FB3A-4C64-918D-3B45BBEB09D5@microsoft.com...
>>> I'm looking for a way to 'Lasoo' a section of an image.
>>>
>>> Similar to the sparkling wand mask tools in Photoshop and the likes...
>>>
>>> Hopefully to return a region object.
>>>
>>> Any pointers ?
>>>
>>>
>>>
>>>
>>>
>>> Any ideas ?
>>>
>>
>>
Date:Tue, 17 Jul 2007 15:16:32 +0200   Author:  

Re: Sparkling Lasoo Wand Tool !   
Tried that already.

Inspiration ?

It gave me a huge headache !
Couldn't follow it there's so many variables and constants.

Any more ideas folks ?


"SharpCoderMP" wrote:


> take a look at code behind paint.net - guys did great job there, you can
> find lots of inspiration as the source code is made public available.
> though i imagine you may get a bit confused when you first time take a
> look at their code ;)
> 
> ohs wrote:
> > The 'Classic Way' ?
> > What / where is Scribble C# ?  Do you mean the MS freehand drawing demo ?
> > 
> > Sorry don't think my original post was clear... the key was in the 
> > 'sparkling wand'.
> > 
> > I didn't want to elaborate incase I steered the response in the wrong 
> > direction.
> > 
> > What I need is the functionality of a tool that when clicked on an point on 
> > an image 'lasoos' a Region of similar coloured pixels (possibley with some 
> > form of edge detection).
> > 
> > A basic implementation would be to create a Region from a blue circle (of 
> > unknown location and dimension) on a green background.
> > 
> > Ultimately I would like to be able to tune the detection parameters to mask 
> > a photographic object, say a face in a portrait.
> > 
> > Does that make more sense ?
> > 
> > 
> > "Bob Powell [MVP]" wrote:
> > 
> >> The accumulation of the points would be done in the classic way. See various 
> >> implementations of Scribble C#.
> >>
> >> The "marching ants" lasso can be drawn using a GraphicsPath taken from the 
> >> points gathered and using a custom brush that changes the custom dash 
> >> pattern a fwe times a second.
> >>
> >> -- 
> >> Bob Powell [MVP]
> >> Visual C#, System.Drawing
> >>
> >> Ramuseco Limited .NET consulting
> >> http://www.ramuseco.com
> >>
> >> Find great Windows Forms articles in Windows Forms Tips and Tricks
> >> http://www.bobpowell.net/tipstricks.htm
> >>
> >> Answer those GDI+ questions with the GDI+ FAQ
> >> http://www.bobpowell.net/faqmain.htm
> >>
> >> All new articles provide code in C# and VB.NET.
> >> Subscribe to the RSS feeds provided and never miss a new article.
> >>
> >>
> >>
> >> "ohs"  wrote in message 
> >> news:75A525D0-FB3A-4C64-918D-3B45BBEB09D5@microsoft.com...
> >>> I'm looking for a way to 'Lasoo' a section of an image.
> >>>
> >>> Similar to the sparkling wand mask tools in Photoshop and the likes...
> >>>
> >>> Hopefully to return a region object.
> >>>
> >>> Any pointers ?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Any ideas ?
> >>>
> >>
> >>
> 
Date:Tue, 17 Jul 2007 07:50:03 -0700   Author:  

Re: Sparkling Lasoo Wand Tool !   
how about a recursive function, starting with the pixel you click on like

sorry for the rubbish pseudo code :)

function CheckPixel (pixel start_ pixel)
    for each adjacent pixel as adj_pixel
        if pixel passes criteria (e.g in colour range)
            include pixel in selection
            CheckPixel(adj_pixel)
        if not
            recursion unravels. (do nothing)

I guess you'd have to calculate the outerbounds of the selected pixels 
somehow as well.
Also, it may be a bit overkill to use recursion, perhaps it would lead to 
stack overflows and the like :)

Andrew

"ohs"  wrote in message 
news:87942771-6735-460C-A91B-E363910F5E7D@microsoft.com...

> Tried that already.
>
> Inspiration ?
>
> It gave me a huge headache !
> Couldn't follow it there's so many variables and constants.
>
> Any more ideas folks ?
>
>
> "SharpCoderMP" wrote:
>
>> take a look at code behind paint.net - guys did great job there, you can
>> find lots of inspiration as the source code is made public available.
>> though i imagine you may get a bit confused when you first time take a
>> look at their code ;)
>>
>> ohs wrote:
>> > The 'Classic Way' ?
>> > What / where is Scribble C# ?  Do you mean the MS freehand drawing demo 
>> > ?
>> >
>> > Sorry don't think my original post was clear... the key was in the
>> > 'sparkling wand'.
>> >
>> > I didn't want to elaborate incase I steered the response in the wrong
>> > direction.
>> >
>> > What I need is the functionality of a tool that when clicked on an 
>> > point on
>> > an image 'lasoos' a Region of similar coloured pixels (possibley with 
>> > some
>> > form of edge detection).
>> >
>> > A basic implementation would be to create a Region from a blue circle 
>> > (of
>> > unknown location and dimension) on a green background.
>> >
>> > Ultimately I would like to be able to tune the detection parameters to 
>> > mask
>> > a photographic object, say a face in a portrait.
>> >
>> > Does that make more sense ?
>> >
>> >
>> > "Bob Powell [MVP]" wrote:
>> >
>> >> The accumulation of the points would be done in the classic way. See 
>> >> various
>> >> implementations of Scribble C#.
>> >>
>> >> The "marching ants" lasso can be drawn using a GraphicsPath taken from 
>> >> the
>> >> points gathered and using a custom brush that changes the custom dash
>> >> pattern a fwe times a second.
>> >>
>> >> -- 
>> >> Bob Powell [MVP]
>> >> Visual C#, System.Drawing
>> >>
>> >> Ramuseco Limited .NET consulting
>> >> http://www.ramuseco.com
>> >>
>> >> Find great Windows Forms articles in Windows Forms Tips and Tricks
>> >> http://www.bobpowell.net/tipstricks.htm
>> >>
>> >> Answer those GDI+ questions with the GDI+ FAQ
>> >> http://www.bobpowell.net/faqmain.htm
>> >>
>> >> All new articles provide code in C# and VB.NET.
>> >> Subscribe to the RSS feeds provided and never miss a new article.
>> >>
>> >>
>> >>
>> >> "ohs"  wrote in message
>> >> news:75A525D0-FB3A-4C64-918D-3B45BBEB09D5@microsoft.com...
>> >>> I'm looking for a way to 'Lasoo' a section of an image.
>> >>>
>> >>> Similar to the sparkling wand mask tools in Photoshop and the 
>> >>> likes...
>> >>>
>> >>> Hopefully to return a region object.
>> >>>
>> >>> Any pointers ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Any ideas ?
>> >>>
>> >>
>> >>
>> 
Date:Tue, 17 Jul 2007 16:25:20 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us