How to mimic Microsoft Photos's Clarity feature in ImageProcessor library - c#

I'm trying to improve the identification of a facial recognition in a photo, because sometimes no face is detected using Microsoft's Face API. In this scenario I want to try to improve the quality of the photo. When I do this manually in Microsoft's Windows 10 Photo app by sliding the Clarity bar, I can now detect a face.
Using the C# library called ImageProcessor, I figured Microsoft's clarity feature is improving contrast and possibly GaussianSharpen. I have used a wide variety of combinations of these two in ImageProcessor, but I don't get the same results.
To view someone else who ran into a similar problem, you can click here: Windows 10 Photos App "Clarity" option algorithm
However, I do not have the reputation to ask in a comment if this had been figured out.
imageFactory.Load(img)
.Contrast(100)
.GaussianSharpen(new
ImageProcessor.Imaging.GaussianLayer(10, 1.5, 10))
.Save(sharpenedImage);
Due to not wanting to post pictures of people's faces online, I cannot provide a whole lot of detail, but would appreciate any insights or direction. The link above does have examples of what the clarity slider does.
In my manual testing I slide clarity to 100.
My C# code fixes some images but not all. Microsoft's clarity feature fixes all.

Related

problems with accessing webcam output in c# application

i know this is most likely a duplication and i am truly sorry for that but most of the solutions i found was either +7 years outdated, bugged or consume so much memory
all i need is an efficient way to access the webcam to record and display to use it in a computer vision project to detect moving objects and such, with an HD output (using HD camera of course)
also if there is a library that would help with the computer vision that would also be great
any information, tips or experience would be highly appreciated, thanks in advance and have a wonderful day.
You could use AForge.net, it's available as a nuget package and gets the job done.
Here is an example of it. It's a winform application, but I use this library in WPF app as well.
[EDIT] Actually, I think I found what you're looking for, download this. It's a piece of code that has been written for a french azure contest. It's a motion detector written with aforge.net. There is 2 part to it, the first is a wpf client that capture movement. The second is an azure website where the image captured is uploaded automatically.

ByteTag recognition is unstable on SUR40 (surface 2.0 sdk)

We are developing applications on a touch table surface SUR40 with XNA and WPF, but vendor's provided byte-tags which are printed have not worked well on the surface.
The detail is Tags are blinking when moving or rotating around the table top (touch surface). And more, at some angles Tag recognition gets flickering even at rest state. I have traversed several forums but not so many clear answers for this issue.
I raise some questions here in case someone who experienced the case may give out good advises:
What's (are) the most important feature(s) for tag recognition: flatness of tags, tag size, tag material, background scene, ... or else.
How to serialize the producing of tags.
We have tried in quite many ways (using soft thick double-side tape, hard rubber plate, acrylic pieces) but all can get fuzzy manual solutions, in which we can not differentiate why this piece is good but those are not.
Appreciate your all helps as I know this issue is quite secluded in programming area.
P/S: byte tags are here:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11029
Take a look at this guide for printing http://msdn.microsoft.com/en-us/library/ee804885(v=surface.10).aspx
And this thread for troubleshooting http://social.msdn.microsoft.com/Forums/en-US/surfaceappdevelopment/thread/78a9e60d-9f99-400f-9ba9-273843414314/
Tag tracking is known to have degraded between Surface v1 and Surface v2 but those 2 links have tips that can help you hopefully get some better performance.
As for serializing production, I'm not really sure what you mean. There are only 255 possible values so it doesn't take more than 4 sheets of paper to print a complete set which you can then cut up and use however you need.

Detecting beats in a song

I'm working on a project which requires me to add beat detection when a song is playing in the application (WinForms - C#).
I'm currently using NAudio.NET for playing the song & displaying details about the song.
Is there a library that would allow me to do this or some way to detecting this manually? I'm not expecting a finished solution but pointers in the right direction. Ideally I would like this to be a real-time detection but it is not essential.
This question has already been asked; check out this StackOverflow thread. Some of the answers include explicit beat detection algorithms and links.
GameDev.net - Algorithm Summary
Comb Filters
More algorithms are on that StackOverflow thread
You can use this BPM Detection Library
Besides BPM calculation it also allows you to get every beat, so you could for example adjust your visualisation, if that is the case.
I've used FMOD to do exactly what you're doing. They don't have annoying popups. You can check out this link to a GitHub project that uses it in c#. Fmod licensing is a little odd, based on what the program's budget is. If your budget is under 500k, you can use it for free, but are supposed to display their logo somewhere, either in a splash screen or credits screen.

Desktop Version of Google's Annotated Time Line Component?

I've been using Google's Annotated Time Line Visualization component for the last couple of weeks and I love it! I've been able to make plots with about 10k points without much trouble.
Do you know of a desktop component I could plug into my application that delivers the same WOW factor that Google's component does? I don't care what the language/toolkit is. I prefer C#,Java,Ruby,C++ or Python... (in that order) however any other's would apply. I also prefer it to be free and open source, but if it's not that's OK as well.
Thanks for your time!
Note: This doesn't have to be cross-platform. Windows is fine.
Edit (2009-08-07):
Even if I can only plot 10k points, I am fine with that. I would just like a desktop control that delivers the same "wow" factor and works in a similar manner (zooming, scrolling, annotations, etc) that the Google component does.
Edit (2009-09-03):
I really prefer the language to be C#. I started a bounty to see if anyone can find some good ones. I want it to be almost identical to Google's Annotated Timeline Component. I would use Google's Component, but I want a desktop component... and I don't want to run into performance limitations because of the browser. Using Adobe Air is out of the question.
Edit (2009-09-03):
Do not recommend Visifire. I have evaluated it, and it doesn't support zooming. Remember, it must be very close to Google's component in terms of functionality and "wow" factor.
This WPF-based chart control at codeproject may put you in the right direction. It's got smooth panning/zooming/scrolling :
WPF Chart Control With Pan, Zoom and More By John Stewien
If you're needing to plot millions of points, you're going to run into performance issues quickly if the control doesn't have a mechanism for loading/sampling only what it needs to display. Even then, that's a very large number of data point to want to access in one control.
Hm i am not sure if this is what you are looking for, but for java there is the very good library JFreeChart which is not exactly as interactive as the one you mentioned but it is really easy to use and pretty flexible for you to subclass and tweak to your preference.
Perhaps you could take a look at matplotlib. It's a python based library, however it's very flexible in that it can take it's input from a variety of sources.
An alternative is to embed a web browser control in you wpf application. You'll probably need access to the DOM, so you might have to use the WebBrowser in a WinForm. A good article descibing how this is done can be found here.
Microsoft also has free chart control you can get at http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en. It's pretty good--especially for being free.
I have used Dundas charts in the past. They are excellent but pricey. There are several other vendors with good chart controls including DotNetCharting, Telerik, Component Art, and Infragistics.

Where can I find, or how can I build, a cartoonizer for C#?

I am working on the development of a Massively Multiplayer Online Role Playing Game (MMORPG) in .NET using C# and Silverlight. One of the features that has been requested for this game is to allow players to upload their own avatars.
Rather than displaying the uploaded images in their raw forms, we want to convert the images to a cartoon form--in other words to cartoonize the image.
Several sites which can accomplish such a task are listed at http://www.hongkiat.com/blog/11-sites-to-create-cartoon-characters-of-yourself/
I realize that these sites are applying an image filter to create the cartoon image. Frankly, I have no reasonable idea what these cartoon image filter algorithms might look like or if there is anything already available in C# or .NET that I could use. If there are no libraries available, I am curious how difficult it would be to roll my own.
This is a minor game feature so I am not interested in devoting a week or more of coding time to implement this. However, if I can code up what I need within a day, then it is probably viable.
At this point, I am primarily looking for guidance as to
what is possible
what libraries are already available (preferably as open source)
where i may find additional information
any other advice or guidance you may be able to provide
Thank you in advance!
Apparently you apply a Gaussian Blur filter to the image. Then you sharpen the image. Perhaps the AForge libraries would help you out.
I've used code from the image processing lab on code project before with success. (update: here's the library it uses)
Christian Graus also has written a whole series on GDI image processing which I found useful (and has the effects listed above for filtering capabilities).

Categories

Resources