iOS automated test framework that allows image comparison - ios

There are a lot of iOS automated test frameworks out there, but I'm looking for one that allows comparison of images with previous images at that location. Specifically, the best method would be for me to be able to take an element that contains an image, such as a UIImageView, and test to see whether the image in it matches a previously taken image during that point of the testing process.
It's unclear to me which of the many frameworks I've looked at allow this.

You're looking for Zucchini!
It allows you to take screenshots at different points in the app testing process, and compare them against previous versions. There is some help about such as this video and this tutorial.
For comparing specific parts of a UI, you can use the masks feature they support to only compare relevant parts of the UI.
You can also check out the demo project.

Related

I want to build an AR tool to place and store text files in a virtual space

It's called a memory palace (Read: 'Moonwalking with Einstein') it's an ancient tool used to memorize, in my case coding concepts and Spanish and Indonesian phrases.
I'm learning python now, but I'm not really sure what direction to move in and what stack should be used to build a project like this. it wouldn't be too complex, I just want to store and save "text files" in a virtual space like my bedroom or on my favorite hikes.
If anyone has insights or suggestions it'd be much appreciated.
Probably the two most common AR frameworks, on mobile devices anyway, at the moment are ARKit for iOS devices and ARCore for Android devices.
I am sure you can find comparisons of the strengths and weaknesses of each one but it is likely your choice will be determined by the type of device you have.
In either case, it sounds like you want to have 'places' you can return to over time and see your stored content. For this you could build on some common techniques:
link the AR object to some sort of image in the real world and when this image is recognised by the AR app, launch your AR object, in your case a text file.
use 'Cloud Anchors' - these are essentially anchors for AR objects that can persist over time, when you close the app and come back to it later, and even be shared between users on different devices.
You can find more information on cloud Anchors at the link below, including information on using them with iOS and on Android:
https://developers.google.com/ar/develop/java/cloud-anchors/overview-android

Photo editing app iOS

I am trying to make a photo editing application for iOS, but am not sure where to start looking. I have attached an image made in Word... that hopefully simply depicts what I am trying to achieve. It will involved manipulating individual pixels of a shape/image and masking/clipping. WHow should I start and what resources are available to me other than the developer docs?
Cheers
If you are not new to programming I would suggest a trial and run kind of approach. If it was me, I would follow a approach like this
Figuring out what to do/ what not to do
Do I need to develop the tech I want from scratch or can I use some pods ?
What are the good reads and example apps - (Try this)
Development approach
Build a photo gallery to pick images from
Build a EDIT mode screen
Get set of template overlay images
Figure out how to overlay them on top of each other
Export the final picture as one picture
The developer documentation is essential when it comes to learning new APIs, but sometimes it can be a little overwhelming. You can try reading raywenderlich.com tutorials on Core Image first to get an idea (link here) or find a book on computer graphics. It is essential to understand at least the underlying techniques to efficiently program image processing code. In many cases you'll find there is a more elegant technique than just looping on pixels and modifying one-by-one.
Then you can continue with reading on image compositing using core image for example.

Unity3D - OCR Number Recognition

Our initial use case called for writing an application in Unity3D (write solely in C# and deploy to both iOS and Android simultaneously) that allowed a mobile phone user to hold their camera up to the title of a magazine article, use OCR to read the title, and then we would process that title on the backend to get related stories. Vuforia was far and away the best for this use case because of its fast native character recognition.
After the initial application was demoed a bit, more potential uses came up. Any use case that needed solely A-z characters recognized was easy in Vuforia, but the second it called for number recognition we had to look elsewhere because Vuforia does not support number recognition (now or anywhere in the near future).
Attempted Workarounds:
Google Cloud Vision - works great, but not native and camera images are sometime quite large, so not nearly as fast as we require. Even thought about using the OpenCV Unity asset to identify the numbers and then send multiple much smaller API calls, but still not native and one extra step.
Following instructions from SO to use a .Net wrapper for Tesseract - would probably work great, but after building and trying to bring the external dlls into Unity I receive this error .Net Assembly Not Found (most likely an issue with the version of .Net the dlls were compiled in).
Install Tesseract from source on a server and then create our own API - honestly unclear why we tried this when Google's works so well and is actively maintained.
Has anyone run into this same problem in Unity and ultimately found a good solution?
Vuforia on itself doesn't provide any system to detect numbers, just letters. To solve this problem I followed the next strategy (just for numbers near of a common image):
Recognize the image.
Capture a Screenshot just after the target image is recognized (this screenshot must contain the numbers).
Send the Screenshot to an OCR web-service and get the response.
Extract the numbers from the response.
Use these numbers to do whatever you need and show AR info.
This approach solves this problem, but it doesn't work like a charm. Their success depends on the quality of the screenshot and the OCR service.

Vuforia: UserDefinedTargets is better than ImageTargets database?

I'm experimenting with Vuforia. It's going pretty well so far.
Previously I've had the ImageTarget demo working with my own targets, so I know I can get this to work for my own purposes. I also realise targets should have a good "star rating" so that Vuforia can successfully track them.
However, the following experiment is confusing me:
I create my own target database using the Target Manager, with one target, which shows up as ZERO star rating. I know Vuforia likes high star ratings, but bear with me. As I expected the ImageTargets app does not seem to recognize my target image. No surprises there really given the ZERO star rating.
However, if instead I run the UserDefinedTargets demo and I take a "live" image of the same target, Vuforia is perfectly able to track the target !
Can anyone explain why this might be the case and how I can fix the problem?
Ideally, I would like to use ImageTargets as this allows me to load in databases as I please.
Alternatively, I would like to be able to store a database captured within the UserDefinedTargets app which I can reuse at a later stage.
Overall, I'd like to know why using the Target Manager doesn't work, but using the UserDefinedTarget app does work, and how I might be able to fix the problem.
Rather than add this to the question, which is already quite lengthy, I thought it better to put it as an answer, although I'm open to other comments and answers!
I think the UserDefinedTarget app may recognize the images "better" because directly after the user defined target image is taken, the camera (i.e. mobile phone) is in the correct position already. This does not, however, explain the excellent "re-recognition" rate, i.e. if the camera is moved away from the target and then brought back over the target, the UserDefinedTargets app recognizes the target instantly every time.
Hmmm...

ios: Adding real time filter effects to photos

I want to program an ios app that takes photos but I would like to filter the photo preview in real time. What I mean is implemented in the app called "CamWow" (here is a video of the app: http://www.youtube.com/watch?v=L_o-Bx08YZE ). I curious how this can be done. Has anybody an idea how to build such an app that provides a filtered real time preview of the photo and captures a filtered photo?
As Fraggle points out, on iOS 5.0, you can use the Core Image framework to do image filtering. However, Core Image is limited to the filters they ship with the framework, and I've found that it is not able to process video in realtime in many cases.
As a result, I created my BSD-licensed open source GPUImage framework, which encapsulates the OpenGL ES 2.0 code you need to do GPU-accelerated processing of images and video. I have some examples of the kind of filtering you can do with this in this answer, and you can easily write your own custom filters using the OpenGL Shading Language. The sample applications in the framework show how to do filtering of images with live previews, as well as how to filter and save them out to disk.
I'm looking for the same kind of info (its a pretty hot sector so some devs may not be willing to give up the goods just yet). I came across this, which may not be exactly what you want, but could be close. Its a step by step tutorial to process live video feed.
Edit: I've tried the code that was provided in that link. It can be used to provide filters in real time. I modified the captureOutput method in ViewController.m , commented out the second filtering step ("CIMinimumCompositing") and inserted my own filter (I used "CIColorMonochrome").
It worked. My first few attempts failed because not all filters in Core Image Filter reference are available for iOS apparently. There is some more documentation here.
Not sure if this code is the best performance wise, but it does work.
Edit #2: I saw some other answers on SOverflow that recommended using OpenGL for processing which this sample code does not do. OpenGL should be faster.

Resources