Take panoramic photos from iPhone app and split into several photos - ios

I am developing an application that allows user to take panoramic photos with iPhone. These photos will be used for virtual tour by the user. I have done some exploration on this and found some good open source libraries that make panoramic view form n number of photos (feels like Google Map street view).
I captured photo in Panorama view with iPhone5 S and imported it does not give me many images. It just gives a single large image.
Is it possible to split iPhone panoramic images in multiple images. If possible how can I do this?

Related

Picking images from camera and album in iOS Swift 5

I'm working in the application where users will select multiple images from album or taking pictures from camera and send it to server via REST API. Size limit is 5MB for all images. Is there any way to determine the size of images while selecting it from UIImagePicker before loading into application?. Also suggest me the better approach do the same
You can’t do it using built in UIImagePickerController. You can write your own asset picker.

Storing UIImage for later use

I am making what can be described as an image manipulation app. My idea is that the user imports UIImages through the pod YPImagePicker and they are stored in two arrays, one for thumbnails and one for the fullsized images. A UICollectionView is then populated with the thumbnails and when the user taps the thumbnail the fullsized image is displayed in a UIImageView.
I am having memory issues with this solution. The RAM hits 300 MB on an iPhone X when I have roughly 10-12 images imported, which I have understood is too much. I guess it is because I store all the fullsized images in an array? Should I store the fullsized images on the users hard drive and not in RAM-memory? Or is there any way I can access the images from the users photo library and fetch the image when the user taps the thumbnail?

Is "slicing" a video attached to iOS app assets possible?

With PNG images, one can attach img.png, img#2x.png, and img#3x.png via assets and then load the correct one at runtime based on the device screen dimensions. In addition, the iTunes upload/download process will "slice" asset resources so that a large app that contains 1x, 2x, and 3x assets can avoid having to download 1x and 3x assets when running on a 2x device. What I am wondering is this, can videos attached to an app also take advantage of slicing so that the app need not download 3 sets of video resources in those cases where videos created for specific screen sizes are included in the app? I see that assets do contain a generic "data" type, but it seems to only be able to mark data files as differing in terms of the Metal API version.
So, I looked all around the internets but was unable to find anything on how to solve this tricky issue. In the end, I rolled my own custom solution that basically wraps the m4v video file and treats the binary file as a PNG image, so that it can be included in an iOS asset catalog. This makes it possible to load #2x or #3x assets on iPhone and use iPad specific video asset dimensions on an iPad while also supporting slicing. For a working example, take a peek at my AlphaOverVideo Framework on github, the Bloom demo shows the client side logic to decode from PNG and then load the decoded .m4v video into a looping player. This demo is cool because it shows off the slicing idea, but it also contains a full screen 1 to 1 pixel aspect video of a flower blooming that shows how amazing perfectly rendered video can look. If anyone is interested in the command line encoder, I uploaded it to github at PNGRewrap.

Detecting same image?

currently working on a side project, but I'm stuck on one big part.
The goal is that the user can take a screenshot from a different popular app that contains 6 images/icons. I want it so when the user goes into my app they can upload that screenshot and I can detect the 6 images and place them into a collection view.
The issue is detecting the type of 6 images in the screen shot, I thought about using an OCR like Tesseract but I'm not sure if that would work because there's zero text in the screenshot, only the 6 images. Something that might help is that in that app there all only 50 kind of images. Would create some sort of database of images help? But how would I compare them?
I apologise if this doesn't make sense I just don't know how to word it. Any help would be great.
Assuming you want to be able to do this across multiple types of devices, a computer vision library like OpenCV might be the way to go.
If your users always run the app on the same device (always on an iPhone 5, say) then the icons might always land in exactly the same spot, and you could simply slice the screenshot up, extract the component images, and do a byte-wise compare on the sub-images. However, you've got iPhone 4, iPhone 5, iPhone 6, 6+ screen-sizes, iPad, iPad retina, iPad pro (small and large) to deal with, and possibly portrait and landscape orientations. Presumably the 6 images will land at different spots on the screens of all those different devices, and you'll have different image resolutions to deal with as well. With OpenCV you should be able to find the bounding rects for the images by "looking at" the screen-shots rather than building a complex set of rules.
Take a look at the OpenCV example code for matching SIFT features (the python version here, but you can find examples in other languages as well). It demonstrates a simpler version of what you want to do.

Image looking blurry on non-retina iPad

I know I should have two versions of my image, one standarad and one #2x but my app downloads a vast amount of content which i need to optimise. Im looking at using just retina images in my downloaded content and then seeing if there is an objective c way to take a graphic half it and make it none retina. using a retina image on my non retina ipad looks blurry.
For images. You have to download separate images with your desired dimensions. For example Facebook timeline has separate image for user icon (e.g. 25x25). and For ever post having photo, a thumbnail is generated say it has dimensions (310x160). And then when a user clicks the image to view. It opens the original Image. Whatever dimensions it has. So, In your case. you have to download two images. One for your non retina and one for retina. You can use Flicker API's for that.
Note: You can skip this and continue with retina display because Non retina devices are rarely being used now. So, every one has retina device and app will work perfect with your existing scenario.

Resources