PureBasic Forum
http://forums.purebasic.com/english/

Stitch Images: SIFT
http://forums.purebasic.com/english/viewtopic.php?f=12&t=73780
Page 1 of 1

Author:  JHPJHP [ Thu Oct 10, 2019 11:14 pm ]
Post subject:  Stitch Images: SIFT

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

Download Stitch Images: SIFT from My PureBasic Stuff

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

A standalone OpenCV application (PureBasic Interface to OpenCV not required).

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

Tricks 'n' Tips
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 File Embedding
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Stitch Images: SIFT
Image Waves: LUT
YouTube Player & Downloader
MP4 Player & Downloader
Barcode Generator
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

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

NOTE: This is the beginning of a work in progress, at some point I will be adding a user interface to access the myriad of available parameters.
- StitchImages_DLL.pb: execute numerous stitching examples from a DLL
- StitchImages_EXE.pb: execute numerous stitching examples from an EXE
- \scripts\CvMat\: contains the program files compiled to DLL / EXE (new version)
- \scripts\IplImage\: contains the program files compiled to DLL / EXE (old version)

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

If you're familiar with PureBasic Interface to OpenCV then this stitching technique won't be new, but the results will be.
In order to have a near seamless stitch, a Laplacian blending algorithm is applied during the stitch process.

The following examples from PureBasic Interface to OpenCV were the basis for this project.
- le_stitching_1.pb, le_stitching_2.pb, cv_laplacian_blending.pb

Author:  JHPJHP [ Fri Oct 11, 2019 2:26 pm ]
Post subject:  Re: Stitch Images: SIFT

Updated:
- improved parts of the code
- squashed a couple bugs

Author:  BarryG [ Fri Oct 11, 2019 11:21 pm ]
Post subject:  Re: Stitch Images: SIFT

Looks fantastic! Thanks for this. Amazing what you can do with PureBasic.

Author:  JHPJHP [ Sun Oct 13, 2019 2:36 am ]
Post subject:  Re: Stitch Images: SIFT

Hi BarryG,

You are most welcome, thank you for commenting.

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

Updated:
- switched from IplImage to CvMat
- improved various parts of the code
- squashed a couple bugs

NB*: The IplImage version of the code can be found in the [ scripts ] folder.

Author:  BarryG [ Sun Oct 13, 2019 2:48 am ]
Post subject:  Re: Stitch Images: SIFT

I used to use a commercial product many years ago to do it, so it's impressive what you've done.

Author:  djes [ Sun Oct 13, 2019 9:34 am ]
Post subject:  Re: Stitch Images: SIFT

So cool ! :D

Author:  davido [ Sun Oct 13, 2019 3:43 pm ]
Post subject:  Re: Stitch Images: SIFT

@JHPJHP,
Nice work.
Thank you, very much. :D

Author:  JHPJHP [ Mon Oct 14, 2019 6:55 am ]
Post subject:  Re: Stitch Images: SIFT

Hi BarryG,

BarryG wrote:
I used to use a commercial product many years ago to do it, so it's impressive what you've done.

The OpenCV framework and its contributors have done most of the heavy lifting, but thank you for your kind words.

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

Hi djes, davido,

As always, I appreciate you taking the time to comment on the work I have done.

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

Updated:
- fixed a memory issue

Memory Issue
I originally thought the problem was fixed using the Function FreeLibraryAndExitThread; taken from this post by Inf0Byt3.
I later realized that the size set for the image matrix was causing the memory issue.

Author:  JHPJHP [ Wed Oct 16, 2019 10:12 pm ]
Post subject:  Re: Stitch Images: SIFT

Re-Updated:
- added a sizing algorithm
- added cropping
- speed improvements
- added minimal error checking
- squashed a couple bugs

Sizing Algorithm
Large images have the potential to crash the program; images are resized if the total width / height exceeds a set limit.

NB*: The EXE and DLL can now be recompiled directly from the [ scripts ] folder.
- \scripts\CvMat\StitchImages_CvMat_DLL.pb
- \scripts\CvMat\StitchImages_CvMat_EXE.pb

Author:  JHPJHP [ Sun Nov 10, 2019 4:12 am ]
Post subject:  Re: Stitch Images: SIFT

Updated:
- bug fixes & minor code improvements

Stitched together 4 images...

Without Laplacian Blending / Cropping:
Image

With Laplacian Blending / Cropping:
Image

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/