How can I detect faces in images using WPF? - c#

I am using WPF application for photo gallery and I would like to add face recognition to my app.
Any suggestions to do that?

WPF itself won't help yo at all: it's just a way of defining what happens in a Window. You would need to add code utilising a suitable Machine Learning library capable of detecting faces in photos.
I won't go into how the ML libraries need to be set up and trained, or how there might be one already suitably primed available (I don't know). That's a rather large subject and is nothing to do with any presentation layer technology.

Related

Is it possible to port a WPF 3D app to UWP / UAP

I wrote an WPF app using all the 3D stuff of WPF which contains several Views displaying 3D data. IMHO WPF is not the platform for further development of the app so I am searching for some ways to port it to a Universal App/Windows Store App/UWP.
The way, Microsoft is promoting, is to use Unity meaning a complete redevelopment and complicated workflows because it should be a 2D-App with some 3D views.
The other way I was looking at way using Helix-Toolkit, because it does not just offer the WPF-way of displaying 3D but also the DirectX way using SharpDX. Unfortunately the progress concerning UWP is pretty low and not currently usable in the extend I need (like displaying custom geometries etc.).
Is anybody out there who got the same problem and found a workaround?
TY!
You may also like to consider Monogame. Like Helix-Toolkit it's based on SharpDX (when it's on Windows anyway). It's not quite as "componentised" as Helix-Toolkit but it's possible to make your app UWP-first and Monogame-second.

Real time 3d rendering navigation

I have no idea at all about the 3D Visualization ,and i want to create an application ,the application idea depends totally on the 3D structure .
I'll do my best to clarify my question to avoid considering it vague .
The main goal of my application is the (navigation) part in 3D environment .I want to upload maps of a specific area and the application allow to guide the user to its destination.(real time 3d rendering).
The application should work on kiosk ,smart phones and on web.(multiple platforms).
The following video clarify what i want to do exactly :
3D wayfinder
Now I want to know a start point to begin without reinventing the wheel,if there are some frameworks should i learn about first?
I'm a.net developer(asp.net) and i begin to learn CMS (Joomla),so it 'll be great to find APIs or frameworks near to this area to achieve my goal as soon as possible.
From requirements you specified, I would like to advice to look at Unity3D.
Unity3D will help to develop application which will work on almost all major platforms including kiosk, smart phones and on web.
You can develop using C# language which should be familiar to you.
There are number of projects which aims similar goal as rendering 3D map. There are "Google Maps for Unity" plugin and I can advise to look at Displaying Maps in Unity3D post.
Unity can be integrated to Joomla if necessary
Another option would be to build the front-end of the app using HTML5 and do the 3D using Three.js http://threejs.org/
Your back-end could serve up the map and navigation data to the front-end and you render everything in the browser or in your HTML5 smartphone app. If you need to update information in your visualization or load a new location dynamically, this can be done with a simple AJAX call and your callback would add the new info into your Three.js scene.
Forget about what others suggest you in regards to looking at 3D frameworks. Mapping and navigation is a complexity of it's own - 3D frameworks like unity will give you 3D. But they won't give you GIS. Depending on your requirements, you could check Micello for 2D mapping and Deep Map for mobile 3D mapping (http://www.deep-map.com/en). They also help you with creating the maps - which is something you should consider for beforementioned reasons.
You can use OpenCV library in C# for image processing and get help from HTML5 and AJAX .
Try X3DOM. Its a programming language that can be used in applications, web browsers, and much more. And the language is ALOT like HTML and JavaScript. In fact, you can use JavaScript and HTML to access the 3D space in X3DOM.
The website for this language is: x3dom.org

Triggering windows explorer's "rotate clockwise" operation within a C# application

I need to rotate an image clockwise only just once after a certain operation. I felt so lazy to include rotating logic to my current image operations class then I come with this idea. What I need is already built within windows explorer, so is it possible to trigger windows explorer's rotate operations within a c# application for a valid file specified?
I have doubts that I can't access to that kind of functionality but I wanted to ask to make sure.
Thanks!
You're better off not relying on the feature since it is not part of the API and can disappear at any time. You should just do your own image rotation.
I don't think its possible to do it with Windows Explorer's integrated photo rotating, but you should check out the awesome image editing/processing library called ImageMagick. The original API is a native windows (dll) API, but there is a good .NET wrapper that is easy to use.
Here it is:
http://imagemagick.codeplex.com/
There are also wrappers for two dozen or so other languages, linked at ImageMagick's site:
http://www.imagemagick.org/

Suggestions for a video montage application (extracting and playing randomized short clips from a playlist)?

I'm an electronics engineer used to coding in embedded C and assembly, but I decided to start learning higher-level stuff like C#, .NET, etc., so I can start making software as a hobby. I have a great idea for one of my first projects, but after searching several forums for days on end, I'm left not really knowing what would be the easiest path forward.
The functionality that I'm looking to create is pretty similar to the idea of a photo slideshow, but applied to videos instead. The program would open a playlist or a folder full of videos and then play the videos in a random order, starting from a random starting position, and with a fixed duration (let's say 10 seconds as an example). You would end up being able to watch a sort of "video montage" that consisted of small clips from random parts of the videos in the playlist, shown in a random order, ad infinitum until the program is closed.
There are a number of ways I could tackle the problem:
Develop a standalone video player with the fixed functionality of showing "video slideshows." DirectX has the Microsoft.DirectX.AudioVideoPlayback API that
could be a good starting point. I found an example here: http://www.dreamincode.net/forums/topic/111181-adding-video-to-an-application/
Modify an open source project to add the desired functionality. I've seen a few cool projects that could get me started, like this simple C# Movie Player: http://www.codeproject.com/Articles/18552/C-Movie-Player
Use a scripting interface to implement this functionality on an existing media player, like VLC or Winamp. You could also control VLC via C#, like the example here: Controlling VLC via c#
I realize that the obvious answer for most people would be to "use whatever you're most comfortable with," but since I'm a pure beginner, I don't really have any allegiances to a particular language or development environment. So, I was just curious if anybody had an idea of what might be the least painful option for a beginner.
I also apologize that this is not a very specific programming question. I'm sort of just testing the waters to get my footing. Hopefully, once I get started on the project, I'll be able to come back and post more intelligent and relevant questions!
While your background would lend you toward C#, I recommend investigating something like this and using WPF for the media player. You can then control the media player using a background worker in order to stop the video or queue up the next one. Some other .NET concepts that will be of use to you are FileInfo and DirectoryInfo objects, to provide you with the necessary information about the files. I'm not sure if you've had experience with generic data structures in .NET, but the System.Collections.Generic namespace would be a good place to start to get a feel for data structure you want to keep your playlist in. WPF will also be able to help you with transitions between video clips.
Admittedly WPF is easier with an understanding of the MVVM or MVC design patterns, but I think you'll be able to get something working without having to delve too far into that right up front.

Good framework for a C# developer to use for visually stunning presentation layer

I am about to write a front end app, which will be used as a media center app. It will plug directly into a high definition TV. Essentially transforming my laptop into a media player. While this concept is not new, I want custom functionality, so this is why I am not reusing existing products.
I'm a C# developer, so the app should ideally be written in C#. And there is 1 other consideration, I need to accept input via the MCE Remote.
I was considering using Silverlight for this. Would you recommend this? Or any other recommendations for frameworks before I begin planning around this.
Thanks in advance.
This is the type of stuff that the Windows Presentation Foundation was meant for. You'll get a lot more access to the hardware than Silverlight would provide (I.E. that MCE remote you mentioned). You mark up your UI with vector graphics/XAML, and then perform the logic with C#.
EDIT: WPF also has support out of the box for animations which can make your UI a lot more interactive.
EDIT 2: Scott Hanselman has written a really cool application called BabySmash and posted the source online. It basically intercepts keyboard input and shows shapes and sounds on the computer. It's a good "child-proofing" method for your PC. The code could provide you with some insight into WPF and how to do the animations and interactivity that you're looking for.
Is this a desktop app? If so I would use WPF. Silverlight is a subset of WPF, so using WPF you could potentially do more.
Silverlight or WPF, if you want some extra power. Both have a similar programming model (with XAML and code-behind) so you might be able to start with Silverlight and move up to WPF if you need.
The VLC api might be useful for playing your media, someone has created a C# wrapper for it:
http://wiki.videolan.org/.Net_Interface_to_VLC
WPF is certainly the way to go, and for playing media check out the excellent WPF MediaKit: http://wpfmediakit.codeplex.com/ I've used it successfully in many projects.

Categories

Resources