Image Waves: LUT

Share your advanced PureBasic knowledge/code with the community.
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Image Waves

Post by Keya »

just recreate 150 of them first
User avatar
JHPJHP
Addict
Addict
Posts: 2257
Joined: Sat Oct 09, 2010 3:47 am

Re: Image Waves

Post by JHPJHP »

Hi wilbert, Keya,

I tried taking a shortcut and downloading prebuilt OpenCV dynamic libraries for OSX...
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/Users/JHPJHP/Desktop/PureBasic/compilers/:

Dyld Error Message:
Library not loaded: @loader_path/libopencv_imgproc.2.4.dylib
Referenced from: /Users/USER/Desktop/*/libopencv_highgui.2.4.dylib
Reason: image not found
I placed them in the compilers folder (DYLD_LIBRARY_PATH), but the above error was the result. My guess is that internally they were created pointing to a default folder (/Users/USER/Desktop/*/), but I'm not sure. I probably end up building my own libraries, but it won't be for awhile.

If you have any incite or additional thoughts please share.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Image Waves

Post by Keya »

it appears to be a symbolic link that you can patch from the commandline
http://forum.cocoacafe.fr/topic/9120-xc ... ers-dylib/
http://translate.google.com/translate?s ... edit-text=
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

JHPJHP wrote:If you have any incite or additional thoughts please share.
I tried to convert your demo project.
The dylibs do load but the two examples don't work :(
sepia doesn't show any image (problem seems to be cvSet2D) and webcam doesn't respond to the window close button.
Last edited by wilbert on Wed May 31, 2017 2:59 pm, edited 1 time in total.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
JHPJHP
Addict
Addict
Posts: 2257
Joined: Sat Oct 09, 2010 3:47 am

Re: Image Waves

Post by JHPJHP »

Hi wilbert,

I should be able to fix the issues you reported, but I'm having the same problem with the binaries you provided as I did previously.
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/Users/JHPJHP/Desktop/PureBasic/compilers/:

Dyld Error Message:
Library not loaded: /Volumes/Data/Users/wilbertbrants/Downloads/OpenCV/lib/libopencv_core.2.4.dylib
Referenced from: /tmp/PureBasic.0.app/Contents/MacOS/PureBasic.0
Reason: image not found
Figuring out the patch provided by Keya will take time, something I won't have until the weekend.
Last edited by JHPJHP on Fri May 13, 2016 1:00 am, edited 2 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

@JHPJHP,
Did you run it from the unzipped folder without moving the dylibs ?
You should be able to do it like that.

It might be the original path location is hardcoded in the dylib. I'll see if I can find anything in the build settings to turn that off. Maybe Keya knows. Keya is better at building libs from source code as I am.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Image Waves

Post by Keya »

same here it's all new to me (wilbert ive never built a lib on Linux or OSX yet! and only just recently figured out HelloWorld.lib in Windows lol), but i'm sure we'll be able to figure it out with a bit of trial and error and error and error :) and weekend is nearly here!
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

Keya wrote:same here it's all new to me (wilbert ive never built a lib on Linux or OSX yet! and only just recently figured out HelloWorld.lib in Windows lol), but i'm sure we'll be able to figure it out with a bit of trial and error and error and error :) and weekend is nearly here!
Sorry Keya, I was thinking about the work you did on the libjpeg-turbo lib but forgot that was on the Windows version :oops:

otool and install_name_tool seem to be the tools which can help out.
I came also across an option for cmake named CMAKE_SKIP_RPATH but I'm not sure if that can help.

It looks like there's also a dependancy from libopencv_highgui to libopencv_imgproc so it might be required to include that dylib also.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
JHPJHP
Addict
Addict
Posts: 2257
Joined: Sat Oct 09, 2010 3:47 am

Re: Image Waves

Post by JHPJHP »

Hi wilbert, Keya,

I just did a quick and dirty build of the binaries, modified the example script, and it worked.
- installed XCode and CMake
- created shared and dynamic libraries


Renaming the build folder confirmed that the libraries internal pointers are still an issue.
Last edited by JHPJHP on Fri May 13, 2016 12:59 am, edited 1 time in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

JHPJHP wrote:I just did a quick and dirty build of the binaries, modified the example script, and it worked.
That's already great to hear :)
JHPJHP wrote:Renaming the build folder confirmed that the libraries internal pointers are still an issue.
You can use otool to check those.
otool -L libopencv_core.2.4.12.dylib
Windows (x64)
Raspberry Pi OS (Arm64)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Image Waves

Post by wilbert »

I updated the dylibs; used install_name_tool to change the references.
Last edited by wilbert on Wed May 31, 2017 2:59 pm, edited 1 time in total.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
JHPJHP
Addict
Addict
Posts: 2257
Joined: Sat Oct 09, 2010 3:47 am

Re: Image Waves: LUT

Post by JHPJHP »

Hi wilbert,

Thank you as always for the information and support.

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

Updated:
- added DPI awareness: SetProcessDpiAwarenessContext

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

Updated (Windows):
- image sizes configured to use the built-in PureBasic DPI compiler option

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
JHPJHP
Addict
Addict
Posts: 2257
Joined: Sat Oct 09, 2010 3:47 am

Re: Image Waves: LUT

Post by JHPJHP »

Updated:
- improved support for images with transparency

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
Locked