The ability of this app is to stitch images/screenshots vertically into a new long image. For instance, when a user browses the posts in his/her twitter, they might want to take a few screenshots along scrolling the content. By import those screenshots into this app, the user could get a new generated long image, which combine all screenshots, and remove the overlapped parts between the screenshots.
- Now the generated stitched image from openCV has correct ratio.
- Add a UIScrollView for fullscreen long image presentation.
- Add a save button allows user to export the long image into device photos library.
- No stitching images limitation now, however I do set 8 images limit for imagePicker.
- This app utilize the
openCV
framework for image stitching function, and I used a class wrapper OpenCVSwiftStitch to deal with image stitching. - By default, this wrapper could handle Panoramic pictures stitching, however I need stitching images vertically. Thus, I rotate each image to left by 90 degree counterclockwise before processing.
The screenshots below illustrated the workflow of this app.
- Install
openCV
framework,pod 'OpenCV', '~> 3.1.0.1'
. If you are using Mac M1, you might need to add this in your Podfile.
# for Mac M1
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
- Close your project and reopen .xcworkspace.
That is all, you are ready to go!
- Stitching screenshots from Youtube, Twitter, AppStore apps works fine. But Stitching screenshots from WeChat doesn't working.
- TBD...