It is currently Fri Nov 15, 2019 8:00 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 12:11 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Hi Keya,

I take it you still haven't downloaded PureBasic Interface to OpenCV ? I spent a couple days writing Spider Web Drawing, and a couple years on the former.
- version 2.4.12 has 18 more relevant examples (don't let an examples legacy tag fool you)

------------------------------------------------

Hi Andre,

Thank you for your stamp of approval, it means a lot.

------------------------------------------------

Hi dobro,

I have absolutely no doubt that your code is original, you have more then proven your skills as a programmer; my attempt at humor was a fail.

Thank you for the link, I can see how the video inspired you, same as the image in my first post inspired me.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 1:38 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Oct 31, 2004 10:54 am
Posts: 761
Location: France
JHPJHP wrote:
my attempt at humor was a fail.

no no !! :lol:

I do not master the English language, and use
Google translator, so necessarily the nuances are erased :lol:

_________________
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 4:36 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Hi dobro,

Cheers.

---------------------------------

Based on comments from wilbert I've updated the code and binaries for better cross-platform compatibility.

Updated:
- replaced ico files with png files
- added a few CompilerIf statements
- ...

Compiler Options/Use Icon is still set to an ICO file, but I've included an ICNS file in the binaries folder for the Mac OS.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 06, 2016 2:29 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 5:29 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3517
Location: Netherlands
JHPJHP wrote:
Based on comments from wilbert I've updated the code and binaries for better cross-platform compatibility.

It's working now on OSX without any modification :)

_________________
macOS 10.15 Catalina, PB 5.71 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 5:49 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3406
Location: New Zealand
Great effect! I looked this morning before my cup of coffee and got quite frustrated repeatedly trying to wipe the cobwebs out of my eyes
so I could see what I was looking at. :lol:


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sat Apr 30, 2016 9:16 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Hi wilbert,

Thanks for the heads up, I'm glad it's fixed; I've applied the same solution to LSB (Least Significant Bit) File Embedding.

-------------------------------------------

Hi idle,

Thank you. If coffee isn't working for you I suggest something a little stronger. :)

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 06, 2016 2:33 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Sun May 01, 2016 3:37 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Updated:
- improved the grayscale algorithm
- fixed an incorrect Constant
- applied some general code-cleanup

-------------------------------------------

Demonstrated in the application Barbouille (Pure_autoPaint) written by dobro, drawing with different shapes produces varying effects.

I'm not going to apply any additional effects to this project, but if you're so inclined...

Modify:
Code:
LineXY(nX1, nY1, nX2, nY2, RGB(nR1, nG1, nB1))

With one of the following shapes (or draw your own):
Code:
Ellipse(nX1, nY1, nX2 - nX1, nY2 - nY1, RGB(nR1, nG1, nB1))
Box(nX1, nY1, nX2 - nX1, nY2 - nY1, RGB(nR1, nG1, nB1))

At a minimum adjust the following values to optimize the result:
- there are various others parameters that can enhance the effect
Code:
nDistance.f = 100
If nDistance > 25 : nDistance - 0.1 : EndIf

NB*: As a side note, this effect including 100+ other effects have been available in PureBasic Interface to OpenCV for awhile.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Thu May 05, 2016 6:48 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Mon May 02, 2016 10:23 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Updated:
- added 4 color spaces
-- Convert to YUV / YCrCb
-- Convert to XYZ
-- Convert to HSV / HSB
-- Convert to HLS

Switched from using Point / Plot to direct pixel manipulation.
- matched closely the standard I became accustomed to while working with OpenCV
- should offer improved speed (not needed here, but required in future projects)

The added color spaces were not intended as a decorative effect...

My intention is to convert a few more examples from PureBasic Interface to OpenCV, but some of the requirements call for an alternate color space from the standard RGB. This project seemed the perfect place to host / test the Procedures, as I was in the process of switching to direct pixel manipulation anyway.

NB*: Update also includes various other improvements not worth documenting.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 06, 2016 2:34 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Wed May 04, 2016 6:16 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Updated:
- added 4 color spaces
-- Convert to YIQ
-- Convert to Hunter LAB
-- Convert to CIE-LAB
-- Convert to CIE-LUV

JHPJHP wrote:
The added color spaces were not intended as a decorative effect...

My intention is to convert a few more examples from PureBasic Interface to OpenCV, but some of the requirements call for an alternate color space from the standard RGB. This project seemed the perfect place to host / test the Procedures, as I was in the process of switching to direct pixel manipulation anyway.

NB*: Update also includes some minor bug fixes and improvements.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 06, 2016 2:35 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Wed May 04, 2016 9:39 am 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
Very impressive !

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Wed May 04, 2016 10:07 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3517
Location: Netherlands
JHPJHP wrote:
Switched from using Point / Plot to direct pixel manipulation.

If you want to keep it cross platform, you also need to examine and respect DrawingBufferPixelFormat() .
It's very inconvenient the formats on Windows, OSX and Linux are different.

_________________
macOS 10.15 Catalina, PB 5.71 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Thu May 05, 2016 6:32 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Hi walbus,

Thank you for the complement, it's very much appreciated.

-------------------------------------------------------

Hi wilbert,

I'm not sure about Linux, but I believe the issues with OSX are fixed, please let me know.

-------------------------------------------------------

Working with OSX motivated me to take a second look at the color space algorithms. Most of the associated Procedures have been updated because of this, returning more accurate results.
- I used the example cv_cvtcolor.pb from PureBasic Interface to OpenCV as a guide for comparison

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 06, 2016 2:35 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Thu May 05, 2016 7:19 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3517
Location: Netherlands
JHPJHP wrote:
I'm not sure about Linux, but I believe the issues with OSX are fixed, please let me know.

Yes, it's working again :)

_________________
macOS 10.15 Catalina, PB 5.71 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Thu May 05, 2016 7:47 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3406
Location: New Zealand
it's working on Linux


Top
 Profile  
Reply with quote  
 Post subject: Re: Spider Web Drawing
PostPosted: Thu May 05, 2016 2:59 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1592
Hi wilbert,

Thank you for confirming it worked in OSX. I have PureBasic installed in an OSX VM, but I had concerns that the RGB order may still have been a problem.

---------------------------------------------

Hi idle,

Thank you for confirming it worked in Linux, I've now installed PureBasic in a Linux OS VM.

If you have a moment I've noticed a few problems.
- elementary OS 0.3.2 Freya (64-bit)
- Built on Ubuntu 14.04
- PureBasic 5.42 LTS (Linux - x64)

The program opens with a window inside another window. The first (outside) window is the correct size, and the second (inside) window is smaller with scroll-bars, hosting all the Gadgets. Both windows have a title bar with the small closing-X, and the first window is transparent.
- have you seen this before, and if so do you know a way to correct it

I've updated the RunProgram (default image viewer) with the application shotwell.
- is this a standard Linux image viewer, and if not what is the default image viewer

Thank you.

---------------------------------------------

NB*: I'm pleasantly surprised that all 10 color spaces remained consistent across all three IDE's / OS'.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Mon May 09, 2016 12:31 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye