image processing library for colour identification - image-processing

I am going to use Unity 3D to create a Flood Management game.In the game,I will project a terrain created in Unity and the user will place objects like dams,levees etc.All these objects need to be recognized via a camera using some image processing technique.Any ideas as to how I should go about this?We thought of placing QR codes on these objects, but that wont work as we will have to recognize multiple QR codes from one image which is probably not feasible.Also, are there any other efficient methods

Wow lots of nice ways to do this.
Easiest: Color tracking using colors
Harder but more interesting: Use Vuforia plugin with markers.
Stephane

Related

Displaying visual content on a building with ARKit

We want to display content on a building in real life. The building is very big, I think we will have troubles with using ARKit to scan and detect objects. What should we use to scan a building and/or display visual content (like red dots you can touch to get more info about the single components of the building)?
We also thought about image tracking. Any hints on which technology is the most appropriate for this scenario?
It's very complicated question. I think if you are near the building you can apply an image recognition technique for any plate with logo on a wall (or for any distinctive part of the facade) employing ARWorldTrackingConfiguration() or ARImageTrackingConfiguration() classes.
But if you're far from the building you can apply object detection technique employing ARReferenceObject() and ARObjectScanningConfiguration() classes respectively. So there would be a kind of symbiosis of different techniques in your AR application.
Hope this helps.

iOS Programmatically take a picture with camera based on what camera sees

I am currently working on an iOS app that can take a picture programmatically using AVFoundation libraries like AVCaptureDevice through a custom button.
The new requirement is that the camera should automatically take a picture when the camera session detects something specific. For example, if the camera is open, and I line up an apple to fill a certain circle part of the capture screen, it should take the picture automatically. We can see this auto capture feature in some banking apps when you submit a mobile check deposit.
Does anyone know of existing libraries(open-source or proprietary) that can analyze images in real time while a user is taking a picture?
The first thing you are going to need to do is decide how you want to detect the apple. You can do this using shape detection, image recognition, or various other methods. This is important because you need to know the approach you want to take before you can identify the best way to implement it.
Once you know how you are going to identify the apple, the easiest way to do real-time image processing like this would be to use an existing augmented reality SDK. For example:
http://www.wikitude.com/products/wikitude-sdk/
http://artoolkit.org/
https://developer.vuforia.com/
If you are feeling really adventurous you could roll your own using AForge or a similar library. I have taken this approach in the past for basic shape detection projects.
Edit
The reason I suggest using an existing AR SDK is because generally they provide a lot of the glue between the camera feed and their API for you and it takes a lot of leg work out of the equation. Even though you won't be using any of the actual "augmentation" part of their SDKs, you can still take advantage of the detection part.
No matter what approach you take, you can think about it in the simplest terms of looking a picture, and figuring out if the item you want is in that picture. How do you decide? In most cases you look for a specific shape or pattern.

How to rotate an image in dart?

I'm trying to develop a simplistic 2D browser game with dart.
The player is drawn from a png-image represented by an ImageElement in dart.
I want the player-image to turn towards the mousepointer, but cant find how to rotate an image in dart.
Any suggestions as to how this might be done?
I would highly recommend using the StageXL library for this (https://pub.dartlang.org/packages/stagexl). It's basically a recreation of the Flash APIs for Dart. It makes doing that sort of thing very easy, and it's often used to create Dart games.
I ended up using multiple images for the 8 general directions the player can move and set them accordingly.

Is is possible to use Vuforia without a camera?

Is it possible to use Vuforia without a camera for image tracking?
Basically I would like a function I could call with an image as a indata parameter and coordinates of a image target as a result. Does that exist?
It is unfortunately not possible. I've been looking for such an option myself several times while working on a Moodstocks (image recognition SDK) / Vuforia mashup (see these 2 blog posts if you are interested in it), but the Vuforia SDK prevents the use of any other source than the camera.
I guess the main reason for this is that the camera management is fully handled internally by the Vuforia SDK, probably in order to make it easier to use as managing the camera by ourselves is at best a boring task (lines and lines of code to repeat in each project...), at worst a huge pain in the ass (especially on Android where there are sometimes devices than don't behave as expected).
By the way, it looks to me like the Vuforia SDK is not the best solution you can find for your use case: it is mainly an augmented-reality SDK, focussed on real-time tracking, which imply working with a camera stream... so using it to do "simple" image recognition looks really overkill!

Animated 2d Map Desktop Widget

I need to animate some vector icons smoothly moving about a 2d map. I have time-lat/lng pairs forming tracks. Down the road I would really like to be able to convey various GIS data like topography and roads on the map along with my smoothly animated icons.
Any suggestions on what to use? I find things like Quantum GIS but it seems geared to generating static maps. I've tried messing around with KML but I cannot find any way to make things move smoothly: marker icons clearly bounce along the waypoints even when I space them very closely.
EDIT: clarified I'm interested in a desktop widget
Animation options are limited in GIS as far as I am aware.
ESRI's ArcObjects could be used to create animations - see this chapter in the online help:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_animation
and these examples (however none have vectors moving around):
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Sample_animation_videos
ESRI software is expensive to purchase, and users would also need the software if you wanted to provide more than an exported video.
You are probably best working with WPF (is this widget for Windows?), Silverlight, or Flash. ESRI have a Silverlight example here:
http://www.codeproject.com/KB/showcase/GIS_Silverlight.aspx
There is also the following collection of WPF classes for the OpenSource SharpMap:
http://wpfsharpmapcontrols.codeplex.com/
However it seems very much in beta at this stage.
Alternatively it may be easier to use GIS software solely to provide a background image, and do all the animation elsewhere.
I would say, try this animation code for Google Earth; however, try emailing the osgeo or qgis userlists and they'll guide you

Resources