Page 1 of 1

Stitch Images: SIFT

Posted: Thu Oct 10, 2019 11:14 pm
by JHPJHP

Re: Stitch Images: SIFT

Posted: Fri Oct 11, 2019 2:26 pm
by JHPJHP
Updated:
- improved parts of the code
- squashed a couple bugs

Re: Stitch Images: SIFT

Posted: Fri Oct 11, 2019 11:21 pm
by BarryG
Looks fantastic! Thanks for this. Amazing what you can do with PureBasic.

Re: Stitch Images: SIFT

Posted: Sun Oct 13, 2019 2:36 am
by JHPJHP
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.

Re: Stitch Images: SIFT

Posted: Sun Oct 13, 2019 2:48 am
by BarryG
I used to use a commercial product many years ago to do it, so it's impressive what you've done.

Re: Stitch Images: SIFT

Posted: Sun Oct 13, 2019 9:34 am
by djes
So cool ! :D

Re: Stitch Images: SIFT

Posted: Sun Oct 13, 2019 3:43 pm
by davido
@JHPJHP,
Nice work.
Thank you, very much. :D

Re: Stitch Images: SIFT

Posted: Mon Oct 14, 2019 6:55 am
by JHPJHP
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.

Re: Stitch Images: SIFT

Posted: Wed Oct 16, 2019 10:12 pm
by JHPJHP
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

Re: Stitch Images: SIFT

Posted: Sun Nov 10, 2019 4:12 am
by JHPJHP
Updated:
- bug fixes & minor code improvements

Re: Stitch Images: SIFT

Posted: Fri Mar 18, 2022 2:54 pm
by JHPJHP
Updated:
- added StitchImagesMem_1_DLL.pb, StitchImagesMem_2_DLL.pb
-- includes Capture Screen and Rotate Image algorithms (StitchImagesMem_1_DLL.pb only)
- improved StitchImages_DLL.pb, StitchImages_EXE.pb
-- added option to return stitched image to memory (StitchImages_DLL.pb only)

StitchImagesMem_1_DLL.pb and StitchImagesMem_2_DLL.pb
Stitch two images together from/to memory; based on a question asked here.
The first example stitches a screen capture split vertically into two images then rotated.
The second example stitches two images loaded using CatchImage.

Re: Stitch Images: SIFT

Posted: Tue Mar 22, 2022 4:56 am
by JHPJHP
Updated:
- improved all examples; more user friendly
- added the following configurable parameters
-- SaveImage: save the stitched image to a user-defined PNG; alternatively return the image as a memory pointer
-- MaxSize: set the max width/height (whichever is larger); anything less than 10 will skip Procedure
-- BlendSize: set the overlap size for the Laplacian blending algorithm; anything less than 1 will skip Procedure
-- CropImage: crop the image removing black borders; more relevant for images greatly utilizing warp perspective
- removed IplImage versions
- squashed a couple bugs

NB*: Stitch Images: SIFT free executables were also updated.

Stitched together 4 images...

Without Laplacian Blending and Cropping:
Image

With Laplacian Blending and Cropping:
Image