Image Waves: LUT

Share your advanced PureBasic knowledge/code with the community.
User avatar
JHPJHP
Addict
Addict
Posts: 1861
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Image Waves: LUT

Post by JHPJHP »

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

Download Image Waves: LUT from My PureBasic Stuff

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

Announcements
PureBasic Interface to OpenCV
PureBasic Interface to WinDivert
PureBasic Interface to WinRAR
PureBasic Interface to 7-Zip
PureBasic Interface to ImDisk
Windows Services & Other Stuff
Invading Space Aliens
Death Star vs Asteroids
GIF Toolkit
LSB Image Steganography
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Chromium Edge WebGadget
IAccessible Interface
Stitch Images: SIFT
OldSkool Fire Effect
Image Waves: LUT
YouTube Player & Downloader
MP4 Player & Downloader
Large Image Viewer
Barcode Generator
Google Translate Service
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

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

Based on work I started in PureBasic Interface to OpenCV.

[ Click anywhere on the image to set a new X/Y position, resetting the effect. ]

Image Waves:
- Drag & Drop image uploading
- Press the 'Enter' key to toggle the Wave Map
- Press the 'Spacebar' to trigger the effect from the last location
- Right-mouse-click the display area to open a context menu
-- Open New Image
-- Toggle Wave Map
-- Trigger Waves
-- Open Control Panel
-- Close Image Waves
Last edited by JHPJHP on Sat Oct 16, 2021 8:57 pm, edited 63 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
idle
Addict
Addict
Posts: 3677
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Water Ripples

Post by idle »

very nice, works fine on linux
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
walbus
Addict
Addict
Posts: 930
Joined: Sat Mar 02, 2013 9:17 am

Re: Water Ripples

Post by walbus »

Very nice again !
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
Joris
Enthusiast
Enthusiast
Posts: 754
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.
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Kwai chang caine
Addict
Addict
Posts: 4978
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
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
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
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3749
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.
macOS 10.15 Catalina, Windows 10
User avatar
JHPJHP
Addict
Addict
Posts: 1861
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Keya
Addict
Addict
Posts: 1866
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: 3749
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 :)
macOS 10.15 Catalina, Windows 10
Post Reply