Image Waves: LUT

Share your advanced PureBasic knowledge/code with the community.
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Water Ripples

Post by idle »

very nice, works fine on linux
Windows 11, Manjaro, Raspberry Pi OS
Image
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Water Ripples

Post by JHPJHP »

Hi idle,

Thank you for your kind words, and for confirming compatibility to the Linux OS.

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

Fixed an issue reported by AAT.

Updated:
- added 1 menu item
-- Open Control Panel: adds the ability to fine-tune the ripple effect

NB*: Settings are save to an ADS (Alternate Data Stream) attached to the default image (only available in the Windows OS).
Last edited by JHPJHP on Mon May 09, 2016 5:02 am, edited 4 times in total.
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Water Ripples

Post by walbus »

Very nice again !
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Water Ripples

Post by JHPJHP »

Hi walbus,

Thank you, I'm glad you liked it.

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

Updated:
- fixed a couple issues with the Control Panel
- added tooltips to the Trackbars
Joris
Addict
Addict
Posts: 885
Joined: Fri Oct 16, 2009 10:12 am
Location: BE

Re: Water Ripples

Post by Joris »

Nicely done.

I think there is a nice movie in the make... this code, your spider code...
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Water Ripples

Post by JHPJHP »

Hi Joris,

Thank you. I'm not sure about a movie though, unless it's about a programmer who drinks way too much coffee while creating useless programs :lol:

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

Updated:
- added an additional setting to the Control Panel
-- Wave Distance

- refined some settings for a smoother effect

NB*: Renamed the program to Image Waves.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Image Waves

Post by Kwai chang caine »

There's even there any words, to describe your splendid and numerous works ??? :oops:
Thanks a lot for sharing 8)
ImageThe happiness is a road...
Not a destination
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Image Waves

Post by JHPJHP »

Hi Kwai chang caine,

Thank you for trying the program and posting a comment, it's very much appreciated.

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

Updated:
- applied a few program and cosmetic changes

NB*: To see a slightly altered version try the example cv_water_ripples.pb located in PureBasic Interface to OpenCV.
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Image Waves

Post by applePi »

Thank you JHPJHP for this program and the spiderweb program. i see you convert some programs from the PureBasic Interface to OpenCV to a standalone programs, i think this is good and appreciable, since it is in this way will be available to a more users.
regarding the image waves, i can't change the blue back ground since i barely see the black waves in the wave map section. in fact i am lost trying to figure out where is that canvas background color lines.
thanks for all your efforts
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Image Waves

Post by JHPJHP »

Hi applePi,

You're very much welcome.

You're correct that one of the reasons why I converted the programs from PureBasic Interface to OpenCV was to bring them to more people, but also to bring more people to the interface.

The colors blue and black are a result of the byte-order determined by the OS; Windows is BGR while OSX is RGB. The color value is part of an algorithm used to determine the X/Y displacement, so this cannot be adjusted without affecting the output.

WaveMap / LUT (Lookup Table):
- the declaration in the Procedure BlendWaveAndImageLUT includes the WaveMap image, making a ProcedureReturn statement redundant
- SetWaveMap is one of the variables in the main window loop determining which image is drawn on the CanvasGadget

NB*: The program has been updated removing redundant ProcedureReturn statements, including a few optimizations.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

JHPJHP wrote:You're correct that one of the reasons why I converted the programs from PureBasic Interface to OpenCV was to bring them to more people, but also to bring more people to the interface.
It would be great if the interface was cross platform since OpenCV is available not only on Windows but als on OSX and Linux.
Windows (x64)
Raspberry Pi OS (Arm64)
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Image Waves

Post by JHPJHP »

Hi wilbert,

A cross platform version of PureBasic Interface to OpenCV has been on the back of my mind for awhile. I don't think I would recreate the entire interface (200+ examples), but maybe an OSX and Linux version of PureBasic Interface to OpenCV :: Demo (32bit / 64bit) :?:

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

NB*: The program has been updated with a few optimizations.
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Image Waves

Post by Keya »

agree multi-OS demo would be supercool :)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

JHPJHP wrote:I don't think I would recreate the entire interface (200+ examples), but maybe an OSX and Linux version of PureBasic Interface to OpenCV :: Demo (32bit / 64bit) :?:
You don't have to recreate all 200+ examples.
If you can do a few cross platform examples and maybe make new examples cross platform, that would already be great :)
Windows (x64)
Raspberry Pi OS (Arm64)
Locked