It is currently Mon Jun 24, 2024 7:53 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Thu Feb 13, 2020 4:55 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Author: David Mládek
Licensed under the GPLv3.
Advanced edge detection - GIMP plugin implementing Canny filter for edge searching.

Download source: https://github.com/mladedav/canny-edge- ... imp-plugin

In menu GIMP: Filters/Edge-Detect/Canny edge detection

From the documentation (translation from Czech to English using Google translate):

The plugin works on grayscale images, but can convert both RGB and INDEXED images to GRAY alone, and then perform its function.
The plugin is not yet able to work with images that have an alpha channel.

The plugin can interact interactively by filling in the "High Threshold" and "Low Threshold" values, which determine how thick edges will eventually remain in the image
(higher values ​​mean less tolerance). The values ​​can be any number from 1 to 255, if the lower threshold is higher than the upper threshold,
the upper threshold will be set to the same value as the lower threshold. Any values ​​entered should not cause unexpected behavior or failure. Preview is also available in interactive mode.

It can also work non-interactively, where five parameters are passed, and the last two are the same as in interactive mode. Again, the same values ​​are expected,
but they are not checked, and anyone who creates scripts with non-interactive calls should know the calling convention and restrictions in advance.


Nidhogg pointed to the possibility of using Canne in the thread about the Kirlian effect. Thanks for the solution.
viewtopic.php?f=11&t=18002&p=247339#p247336
Lylejk requested a version for Windows - so I compiled (32/64 bit for Gimp 2.10.14)

Edit 14-02-2020
Attention.
The 64bit version does not work properly (there is a problem with scroll bars and enlarging the window size for the preview) - sorry but I don't know why.


Attachments:
CannyED.png
CannyED.png [ 96.3 KiB | Viewed 6552 times ]
Canny-edge-detection-Win 32_64bit Gimp2.10.zip [272.13 KiB]
Downloaded 447 times

_________________
Image

Slava
Ukraini!


Last edited by MareroQ on Fri Feb 14, 2020 5:47 pm, edited 1 time in total.
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Thu Feb 13, 2020 10:02 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
Thanks for the Windows version MareroQ.


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Thu Feb 13, 2020 10:56 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12530
Thanks, Mario. Works great. This one's on the tithonia capture I did a few years back. Have to experiment more, but am quite impressed and see its application for masks (which I need for other things such as mosaics). :)


Attachments:
tithonia_c.png
tithonia_c.png [ 99.86 KiB | Viewed 6484 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Thu Feb 13, 2020 11:40 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4750
Quite good given the image. Just wondering why it missed half the horizon while at the same time detecting the edges of the wake.

Attachment:
CannyLSD.jpg
CannyLSD.jpg [ 749.02 KiB | Viewed 6475 times ]

_________________
Image


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Thu Feb 13, 2020 2:07 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
ofnuts wrote:
Quite good given the image. Just wondering why it missed half the horizon while at the same time detecting the edges of the wake.

Because you didn't play with the threshold. Low threshold 53, high threshold 63.

Image


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 2:02 am  (#6) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 316
I have problems with the plug-in crashing. This is caused by using the scroll bars in the preview window to pan the preview. Occasionally also caused by resizing the preview window, but the scroll bars are much worse.
Window 10
Gimp 2.10.12


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 3:17 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Blighty.

I am sorry that there are problems (I do not know if this is a problem in the code or the build environment or Gimp version).
This was a standard build without any code change (except in the menu location).
Can you confirm this for both versions (32 and 64 bit - because it was compiled in a different msys2 environment).
Does setting the window size without preview enabled help?

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 4:13 am  (#8) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4750
Nidhogg wrote:
ofnuts wrote:
Quite good given the image. Just wondering why it missed half the horizon while at the same time detecting the edges of the wake.

Because you didn't play with the threshold. Low threshold 53, high threshold 63.


Ah, nice....

_________________
Image


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 4:50 am  (#9) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7740
Location: On the other side of this screen
Kept on crashing on me. I found if I click ok quickly I would get a result. So after finding out where I needed the 'threshold's to be I did it fast.
Image

_________________


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 4:55 am  (#10) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 316
MareroQ wrote:
Hi Blighty.
Can you confirm this for both versions (32 and 64 bit - because it was compiled in a different msys2 environment).


Did some more testing.

32 bit on Win 10 64 bit:
preview scroll bars - no problem
preview resize window - no problem
threshold - crashed once while playing, could not repeat

64 bit on Win 10 64 bit:
preview scroll bars - crashes regularly after 5th or 6th scroll
preview resize window - crashes on occasion, difficult to repeat
threshold - no problem


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 9:21 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12530
Yeah; mine did crash a few times; if you don't scroll, you usually don't get a crash. May try the 32-bit version later (why not; don't think there would be a penalty for doing so; lol). :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 2:43 pm  (#12) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
lylejk
I tried today but often crash when i change settings,so i gave up.

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Fri Feb 14, 2020 11:49 pm  (#13) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7740
Location: On the other side of this screen
Tried again today on the same picture. After making sure the resulting edge detect was changed back to RGB mode I added the same colour picture again as a layer on top and set layer mode to grain merge
Image

_________________


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 1:46 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
For the test, I rebuilt the new msys2 environment with Gimp 2.10.15 and compiled Canny. This did not solve the problem.

I wanted to try the option of using Canny in the Diego's Filling scripts plugin - I looked at PDB canny ... and was surprised.

I'm not an coder but it's easy to see that there are errors in the code.

Following only logic I tried to fix it.
For brave testers Ver.0.2


Attachments:
PDB CannyOrg.png
PDB CannyOrg.png [ 12.52 KiB | Viewed 2099 times ]
PDB CannyNew.png
PDB CannyNew.png [ 14.35 KiB | Viewed 2099 times ]
Canny-edge-detection V-0.2-Win 32_64bit Gimp2.10.zip [279.96 KiB]
Downloaded 108 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 2:38 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks.
Is the exe installable on Windows? I ask because on the sources it's written "do not install on Windows".

_________________
"Where am I ?"


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 2:56 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Well, just installed. It runs.
Thanks.

_________________
"Where am I ?"


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 3:11 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Diego.

The GPL license requires a source file (* .c) so some users will also put it in the plug-ins directory and this is the first step to trouble - hence the note (do not install for Windows source file "canny.c").

Thanks for the test.

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 5:56 am  (#18) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7740
Location: On the other side of this screen
MareroQ wrote:
Hi Diego.

The GPL license requires a source file (* .c) so some users will also put it in the plug-ins directory and this is the first step to trouble - hence the note (do not install for Windows source file "canny.c").

So you don't put the canny.c file in? I just put the 64 bit plugin and it still crashed if I played with the settings too long. Works if I dont but then I can't get a good result

_________________


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 7:07 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
SallyAnne, I suppose you get a crash when modifying the settings using the ^ (or the opposite) and letting the filter scale the value by 1 continuously up to the desired value.
If you instead replace each value by a new value entered directly by yourself, it should work (at least I did it repeatedly and no crash).

_________________
"Where am I ?"


Top
 Post subject: Re: Canny Edge Detection Gimp 2.10 Win10 32/64 bit.
PostPosted: Sun Feb 16, 2020 8:48 am  (#20) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Sallyanne, I love your image in post 13. It is really very nice.


Top
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Canny Edge Detection Gimp 2.10 Linux 64 bit

4

No new posts Attachment(s) GEGL Edge Extract - Edge Neon's algorithm in transparent background

9

No new posts Attachment(s) Efficacy of the new Canny edges in G'MIC

11

No new posts Win7 Games for Win10

2

No new posts Line Art Detection

0



* Login  



Powered by phpBB3 © phpBB Group