Library for creating animated png - c#

I am looking for an APNG encoder in native c#, that does not rely on c/c++ libraries. So far I have only found a few readers and I'd like to avoid writing that library myself if possible.

Here is an APNG viewer/parser article with source code on CodeProject. It might give you what you need.
On Github, there is this APNG parser.
Otherwise, if you give up on finding a native C# library, here is a complete C/C++ toolkit including a C# wrapper.

I've coded a C# PNG coder (PngCs) and lately I've evaluating adding APNG support to it, but, after reading the spec, I doubt I will try it - I really don't like the APNG approach. But the source code is available, it could be a starting point for writing your own APNG coder.

Related

How to use the exact Opencv C++ functions in EMGU?

As mentioned in the EMGU documentations ".Net wrapper to the OpenCV image processing library"
We depended on the functions we could find online but we really didn't figure out how to use those exact OPENCV C++ functions in the opencv documentations like blob?
How to use them in the EMGU platform?
I would suggest looking in the EmguCV source code for the OpenCV functions you are looking for and see how they are wrapped. It is all there.
There is also the need to move data between the managed side and the unmanaged side.
Doug
EmguCV provides a class called CvInvoke which wraps a lot of the basic opencv functionality. The previous link goes for the EmguCV 3.4.3 documentation. Maybe you need another version. Anyway I recommend to also check other classes aside from CvInvoke. The API documentation should be a good starting point.

C# image recognition

I'm currently searching for a C# image recognition library.
What I want to do:
I want to write a function that scans an image and returns if another image is part of it. Or at least something that looks familiar in case that the angles of the two objects are different.
The link to a possible library and a short code example would be great!
Thank you in advance!
Since you didn't mention that you are only looking for free libraries, here are some paid ones:
MVTech HALCON
Cognex VisionPro
Both have demo versions and quite good .Net wrappers bundled to the SDK, and I think both have the functionality you need. In Halcon, you might want to try different matching algorightms (gray value based, descriptor based, etc.), while in VisionPro PatMax or PatQuick might suit your needs. But obviously you have to try which one is the best for your specific problem.
EmguCV (http://www.emgu.com/wiki/index.php/Main_Page) is a good .NET OpenCV wrapper. It has a bunch of sample projects bundled. Run samples and you will get the idea of what can be done and how.
The Accord.NET library is not actually an image recognition tool set, however it provides the base for what you are aiming for. It contains many Imaging classes required for building an image recognition system. Accord.NET is LGPL licensed, except for some parts of it (e.g. its FFmpeg wrapper project).

Capture Sound in C# using .Net Own libraries nothing else

I'm trying to capture Microphone sound using C#, and i have searched Google for this thing and all what i am getting is non .Net Libraries , i only get open source ones Like NAudio and other like DirectX and DirectX.DirectSound which are for managed languages like C# but that is not what I'm looking for. and i have tried them both and i used this open source project as a reference in NAudio
http://voicerecorder.codeplex.com/
and i manged to capture sound and then output it on a speaker or a headphone but i am still having problems when saving the Wav file
but i was wondering is there any .Net Built in libraries that can help me with my objective ?
Thanks for your help in advance :)
i was wondering is there any .Net Built in libraries that can help me
with my objective ?
Short answer: No, at least not at the present time.
The .NET framework does not provide any direct support for recording audio. This is the reason libraries like nAudio exist. You would neeed to use Com Interop and the Windows API to acheive this, and it would be no small task. Even the Coding4Fun article on recording sounds at Microsoft's Channel 19 website uses NAudio. Your best bet would be to follow their example.

RichTextFormat to HTML

I've taken a look at this thread about converting RTF to HTML but some links are down or cost money.
What is the best way to convert RTF to HTML, it is just text (font size, bold, underline, color etc.) not images or anything else.
Any help would be greatly appreciated!
Just Google that dead link of DocFrac, it gives you the open source location on SourceForge and a download location at SoftPedia.
Seems pretty stable, but haven't tried it myself.
EDIT: It uses a COM DLL, or unmanaged DLL, so to speak. You can link that with ordinary P/Invoke calls, but if you have trouble setting it up, have a look at this post which shows how to do this for converting RTF to HTML with DoxLib. The DLLs are found in the *.gz file from SourceForge. There's even a VB6 example project, but that can only be run with a non-.NET version of VB.
The CopySourceAsHtml visual studio plugin (which is open source) does exactly that. Take a look at the sourcecode.
You can try the C# library from the article Writing Your Own RTF Converter which is free.

OCR with the Tesseract interface

How do you OCR an tiff file using Tesseract's interface in c#?
Currently I only know how to do it using the executable.
Take a look at tessnet
The source code seemed to be geared for an executable, you might need to rewire stuffs a bit so it would build as a DLL instead. I don't have much experience with Visual C++ but I think it shouldn't be too hard with some research. My guess is that someone might have had made a library version already, you should try Google.
Once you have tesseract-ocr code in a DLL file, you can then import the file into your C# project via Visual Studio and have it create wrapper classes and do all the marshaling stuffs for you. If you can't import then DllImport will let you call the functions in the DLL from C# code.
Then you can take a look at the original executable to find clues on what functions to call to properly OCR a tiff image.
C# program launches tesseract.exe and then reads the output file of tesseract.exe.
Process process = Process.Start("tesseract.exe", "out");
process.WaitForExit();
if (process.ExitCode == 0)
{
string content = File.ReadAllText("out.txt");
}
I discovered today that EMGU now includes a Tesseract wrapper. While the number of unmanaged dlls of the opencv lib might seem a little daunting, it's nothing that a quick copy to your output directory won't cure. From there the actual OCR process is as simple as three lines:
Tesseract ocr = new Tesseract(Path.Combine(Environment.CurrentDirectory, "tessdata"), "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY);
this.ocr.Recognize(clip);
optOCR.Text = this.ocr.GetText();
"robomatics" put together a very nice youtube video that demonstrates a simple but effective solution.
Disclaimer: I work for Atalasoft
Our OCR module supports Tesseract and if that proves to not be good enough, you can upgrade to a better engine and just change one line of code (we provide a common interface to multiple OCR engines).

Categories