Xamarin Forms Image Recognition - c#

I would like to know if there is any recognition system for Xamarin Forms that can recognise a point (for example a green filled circle) with the camera, in order to extract info from that point (like coordinates).
I know that EmguCV maybe can do that, but the samples are not working and if you want to use it on Xamarin Forms, you have to pay a commercial license, what does not make sense to me if I can't test it before.
Any info about this would be greatly appreciated.

I see 3 ways for you:
use EmguCV:
I use EmguCV for Xamarin Forms, and it's working pretty well.
But it's pretty complicated to configure it... Try this tutorial: Using Emgu with Xamarin Forms. I think you can test it without buying a licence but only on a simulator...
I also found an Azure service called "Custom Vision". You can train a neural network? to recognize objects on your pictures... Take a look at here (there is a free plan): Custom vision Azure service
Finally, If you have enough skill in image processing you can do it by yourself (there are many tutorial on the web).
==> For me the first solution is the best (Emgu is really powerfull). So if you plan to use it for several projects, I suggest you to buy a licence...
"Custom Vision" Azure service look really convenient but I don't know if it fit your needs... You have to test it, and the free plan is limited too...
Good luck

Related

Generating an Organogram in MVC and Displaying in View

I imagine this question will not bear anything, but this is a last ditch attempt before I have to tell my PM I simply can't do it.
My colleague (usefully before leaving the project) was a yes man to everything our PM asked for, regardless of what it was, and I seem to have been volunteered to create some functionality that will generate an Organogram / Organisational Chart and present it in the view.
I have dug around and asked around, no one really seems to know how I would go about doing this. Can anyone offer any advice on anything that can help? Even if it's the most basic tutorial or obscure API ever, it will be helpful.
To put a point on it, my question is: Is it possible to generate a chart in an ASP.NET MVC C# Application, and display it on a View? (Even a yes or no would help)
Yes, everything is possible. It's just a matter of how much time you can spend on it. Not everything has a good return on investment though, but that's for your PM to decide. As long as your team can make an estimation of the complexity.
But for ASP.NET, Microsoft has a Charting library that allows you to build charts. There are also commercial libraries (the first google hit) out there that are more feature rich.
And if they don't work, you can Always build images manually using the System.Drawing namespace of .NET (that will of course take considerably more time than plotting a chart using one of the available libraries). Generated images can be sent through an ashx handler, or you can embed the image in the same page using base64 encoding.
It's not bad to say yes to your PM, but I rather say: "Yes, we will stick this feature on the feature list / back log, and make a estimate of the complexity. Once we know the complexity you can choose to select it for a future iteration." But perhaps I'm talking too Agile now ;-)
You can hand off the chart drawing to an external library, for example, Google Visualization: Organizational Chart
Have a look at this question for other suggested librairies:
What's the best library to draw organization chart using JavaScript?
This sounds like it's in a commercial scenario, so it's really worth looking at the commercially available solutions. Steven already mentioned one, but as far as I can see that one is for Windows Forms and the other one is for charts as in bar charts and provides no organigram features.
A Javascript diagramming library with the capabilities of displaying organizational charts is yFiles for HTML. It has a nice online example of an organization chart that might be exactly what you are looking for:
There is also a Video that shows the demo in action.
The library is a pure Javascript implementation that does not depend on server libraries or servers at all. Integrating it in an ASP.net environment should be easy though, as long as you know Javascript. Being a library it offers full customization capabilities. You can determine the look and the feel of all aspects of the chart. Under the hood the library is a generic graph drawing and editing tool and the organizational chart is just one possible use-case.
Full disclosure: I work for the company that created the library, but on SO I do not represent my employer. My comments, thoughts, etc. are my own.

Capture camera using DirectShow

I'm developping a SmartDevice application (Pocket PC 2003 template) in C# for a device with Windows Mobile 6.1. I need to use the camera of this device (photos, video); to do this work i tried using the CameraCaptureDialog class but it does not work for Pocket PC applications.
So, I documented on the internet and found that I probably refer to DirectShow API, but the problem is that I do not know where to start because I can't found a working/correct example.
My questions:
Is this the right way? Are there alternatives?
Where I can find a very good example that shows how to do this work?
You may try directshowbetcf: http://alexmogurenko.com/blog/directshownetcf/ if you really want to go with DirectShow and NetCF.
There's plenty of examples of directshow on the web. There is a site dedicated to converting the API over to C# which makes it a lot easier, maybe this was it http://directshownet.sourceforge.net/about.html. I struggled with DirectShow until I read the book "programming directshow" from microsoft press. About a third of that way through that book it all seemed incredibly easy and I was able to complete what I wanted. In the end it's a lot like referencing any library and using the classes from within that library. The added difficulty is that you need to add wrappers because they are all COM objects but that has been done for you.
This might be useful to you to understand the DirectShow technology. Basically gives a start to DirctShow and explains some of the important points. But its C++ not C#. Hope this help
Basic Video Capture
DirectShow is the video capture API in Windows Mobile 6. There is a Video Capture Filter there and all in all things are designed pretty much the same way they are in Windows.
The problem is that however that this is a native API, and not just in Windows Mobile. To develop in C# you need some bindings and they are missing. On desktop there is DirectShow.NET, which is a missing piece, but it does not seem to fit well for CE. Yet you still need to fill this gap in Windows Mobile.
To work it around you have a few ways, the first would be to go through DirectShow.NET and update it appropriately to start working on your device, strip parts missing in mobile OS etc. This would get you a twin for DS.NET but for mobile operating system.
Another option would be to do some C++ development and implement the minimal sufficient feature set in that domain, exposing the component via COM. Then you will reference this from managed code and things will get connected together. And another obvious option would be to use a third party solution which already does one of the mentioned above.

Google Maps in C# Visual Studio application

For my university I have to create an application that for the User Interfaces paper that I'm doing. I want to create an application that focuses on Africa and allows the user to plot on the map some points of interest.
First thing first though, i need to be able to get the Google maps API working in a form. Does anyone have any idea how I would do this?
Google maps is based on JavaScript. You will need to embed the maps objects into the page and use it that way.
A good starting point would be http://code.google.com/apis/maps/index.html and the most basic of tutorials is available at http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld.
I would definatley recommend then links above and then move onto something like http://googlemap.codeplex.com/. It's better to know what's going on underneath before abstracting it away.
Alternatively, you may wish to check out GMap.net (the website is not GMap.net: http://greatmaps.codeplex.com/)
GMap.NET is great and Powerful, Free, cross platform, open source .NET
control. Enable use routing, geocoding and maps from Coogle, Yahoo!,
Bing, OpenStreetMap, ArcGIS, Pergo, SigPac, Yandex, Mapy.cz, Maps.lt,
iKarte.lv, NearMap, OviMap, CloudMade in Windows Forms & Presentation,
supports caching and runs on windows mobile!
I've used this before with WinForms and found it pretty handy. I suggest this because parts of Africa may be better served by different map vendors.

Maps for commercial WPF applications

I'm currently developping a commercial Windows application (closed-source, free demo with limited functionality available) in .Net 4.0 using C# and WPF. I'm now looking for a map library with the following features:
World-wide online map and/or satellite data (Like Bing or Google Maps. Due to lack of coverage however, OpenStreetMap does not qualify)
Display of custom colored placemarks
Optionally: Possibility to easily add a simplified offline map, on a lower zoom level
Which mapping solution satisfy those requirements without violating any licenses of the map provider?
If you'd choose Bing, it is fairly simple. As I said, I haven't done it myself, but I've seen it on a demo. It should be something like:
<maps:Map Name="bingmap" Mode="AerialWithLabels" CredentialsProvider="enteryourkeyhere"/>
Where maps is the namespace: clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl
Then, in code-behind:
GeoCoordinate co = new GeoCoordinate((double)myLatitude, (double)myLongitude);
bingmap.SetView(co, 18);
Courtesy goes to Kevin Derudder who did a great presentation (which is where I saw it). It was about Silverlight, but should be almost the same for WPF. Check out his blog post, with code sample.
Have you looked at NASA World Wind? They have a lot of developer information hosted on their website. It is JAVA based, but there are ways around that.
http://worldwind.arc.nasa.gov/java/
And being a Government Agency, I would image that their imagery is Free-Use.
ESRI website Developer Tools Product Page
You may have to go commercial. If so, also look at Thinkgeo Mapsuite.
This is excellent, I guess it will have more than you need:
Great Maps for Windows Forms & Presentation
Just download code and check out the demo!

Good little project to do when learning C# WPF

I want to write a little application for myself to learn C# and WPF.
The typical hello world in 2009 (twitter client) seems boring. I would like to hear your stands should I do a twitter client? Any other starters I could play around with and get used to c#? (I'm a longtime PHP programmer)
A Twitter client ends up being a good way to get started with WPF, for a few reasons:
It's got lists of data with images, which gives you practice with formatting and styling lists
There are a lot of options for styling what you're working on - partly due to the avatars, limited text blocks, etc.
A Twitter app is the kind of application where you expect to see good UI
There are some good libraries availble (I highly reccommed tweet#) so you don't need to bother with any of the plumbing
It's something you can show off and be proud of - people will understand what it does
There are plenty of complex things you can add on later if you want - skinning, drag and drop, autocomplete, spell checking, etc.
There are some open source WPF clients out there, so you can find some sample code if you get stuck
And the number 1 reason why it's good idea... you can start contributing your code to the Witty project. We'd love more help!
I recommend to write a native GUI (WPF) client for your most recent PHP project.
You can try writing a modelling tool (business processes flow/UML (classes)/execution flow i.e. scripts execution flow/etc...).
WPF Virtual Labs are a good place to start.
Only do a twitter client if that's what you're interested in. I don't see why twitter should be the new "hello world.", except maybe for making such a thing, like a twitter or facebook bot.
If you want to focus on C# and OOP, try something with many objects interacting, like a simple fighting game, poker, black-jack, etc.
If you want to learn wpf, try some fancy interface stuff, like a calculator, a video player, a photo gallery.
You're only limited to your imagination. Try to pick something fun, or something you'd like your computer to do, and code away. :D

Categories