dajuric / accord-net-extensions Goto Github PK
View Code? Open in Web Editor NEWAdvanced image processing and computer vision algorithms made as fluent extensions and built for portability
Advanced image processing and computer vision algorithms made as fluent extensions and built for portability
Hi,
I'm porting an app from Windows to linux and I've found a little bug on the library: when using the VideoWriter.Write(IImage) method, the library crashes on linux but not on Windows. A similar situation occurs when reading the same video file in the method Image.CopyTo(T[,]).
After a little debugging I've found that the responsible is the T[,].Lock() extension method: it's miscalculating the image stride (12 instead of 3 for Bgr). Furthermore, Lock() is calling ColorInfo.getInfo(Type), which reads (line 89)
var channelTypes = colorType.GetFields().Select(x => x.FieldType).ToArray();
return getInfo(colorType, channelTypes.FirstOrDefault());
The problem is with the GetFields() method. Per specification, the returned list has no specified order so FirstOrDefault is ill-defined.
Bgr has three instance byte vars and three int constants. MVSC puts the byte vars first but mono (linux) puts the ints first.
A simple fix could be passing some flags to the faulty method call: GetFields(BindingFlags.Public | BindingFlags.Instance).
I tried to run a sample project but I got this error at this line of code
Gray<byte>[,] preparedBWImage = ImageIO.LoadGray(file).Clone();
Does this mean i have to manually add opencv library to the project ?
An exception of type 'System.DllNotFoundException' occurred in DotImaging.IO.dll but was not handled in user code
Additional information: Unable to load DLL 'opencv_highgui248': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Hi,
I am having an issue with the following code when creating a pyramid from this specific image: http://fs1.directupload.net/images/150921/y5oxhkvs.png
var imgDestination = Resources.test.ToArray() as Bgr[,];
var grayImg = imgDestination.ToGray();
TemplatePyramid.CreatePyramidFromPreparedBWImage(grayImg, string.Empty));
The last line returns a null value.
Any idea why this happens? Other images work.
Hi,
Could you please direct me as to how i setup to start using this framework ?
There is no "getting started" section in readme and if i try to run the Solution i get an error with the Unmanaged dll files
Unable to start program
\UnmanagedLibraries\Windows\x64\SIMDArrayInstructions.dll
Also tried 32bit and get
Unable to start program
\UnmanagedLibraries\Windows\x86\SIMDArrayInstructions.dll
Hello Darco ! Thanks for a great job !
I try to use your library to extract a particular frame from an avi file and found a memory leak when the Seek methods is called several times:
ImageStreamReader reader = new FileCapture(filePath);
reader.Open();
reader.Seek(0,SeekOrigin.Begin);
var image = reader.ReadAs<Bgr, byte>().ToBitmap();
reader.Close();
Thank you, Sergei
This is a great library ! but I found that some new feature like
IReadOnlyList in .net 4.5 is used, could you make it target .NET 4.0 ?
I would love to use this library, however I don't see a license attached. Do you plan on adding one?
Hello Darko,
thank you very much for the samples. I wanted to test the robustness of the template matching system to see if it suits my needs. For some reason it is not recognising my hand when I use CameraCapture. It works perfect with your image sequence. Since my hand is not that different than yours, my only clue is that it does not work well with bigger input images, like those of my camera that are 640x480.
Could you give me some hints on what might possibly be wrong?
I have to develop a application for vehicle parts distributors. Vehicle’s parts with specification and it’s price already stored in my database. When user upload the camera picture of a machine parts,It will mach with our image stored in database and its details can view to the customer or related parts can also view, then they can place a order. How to develop it using this. Please assist me
Hello,
resize extension throws an exception 'AForge.Imaging.InvalidImagePropertiesException' if mode is bilinear or bicubic with description 'Destination image must have the size expected by the filter.'
This is due to using ApplyBaseTransformationFilter -> ApplyFilter with a resize filter parameter.
case InterpolationMode.NearestNeighbor:
//return img.ApplyFilter(new ResizeNearestNeighbor(newSize.Width, newSize.Height));
return ResizeNearsetNeighbur.Resize(img, newSize); //faster
case InterpolationMode.Bilinear:
return img.ApplyBaseTransformationFilter(new ResizeBilinear(newSize.Width, newSize.Height));
case InterpolationMode.Bicubic:
return img.ApplyBaseTransformationFilter(new ResizeBicubic(newSize.Width, newSize.Height));
default:
ApplyFilter creates a destination image copy with same size but in case of a resize filter this is not permitted.
This is a great library !
Thanks for doing such amazing work!
I noticed that CameraCapture has been implenmented,
Do you have some plan for implenmenting features about Kinect ?
Thanks!
Hi, Darko Jurić. Thank you for sharing the code. I tried to use particle filter but met a problem. After normalising the weights, do we have to replace the weight in each particle with the normalised one?
var normalizedWeights = normalize(particles);
var newParticles = particles;
var effectiveCountRatio = (double)EffectiveParticleCount(normalizedWeights) / particles.Count();
if (effectiveCountRatio > Single.Epsilon && //do not resample if all particle weights are zero effectiveCountRatio < effectiveCountMinRatio)
{
newParticles = resample(particles, normalizedWeights);
}
After running the code, I found the sum of weights for all the particles in one time frame may not be 1. However, the normalize function works fine. Is it correct to add
for (int i = 0; i < particles.Count();i++ )
particles.ElementAt(i).Weight = normalizedWeights.ElementAt(i);
after
var normalizedWeights = normalize(particles);
Is there anything I miss? Thank you.
Ben
Hi,
Could you please tell me how to convert Bgra< byte > into Bgr< byte >
and how to create Bgr< byte > from System.Drawing.Bitmap effectively ?
thanks!
Hi Darko,
I am looking more closely into your code in order to see if I can turn some of your libraries into PCL, portable class libraries, and I found something that I guess (?) is incorrect.
In the BmpSaveExtensions
class, private method getEncoder
you are calling ImageCodecInfo.GetImageDecoders()
, here. If I am not entirely mistaken, the correct thing in this method would be to call ImageCodecInfo.GetImageEncoders()
, right?
I'm not sure whether it makes any difference in practice, but it looks confusing as it is right now.
Best regards,
Anders @ Cureos
Hi,
I'm trying to run your sample about tracking object. But there is a line of code that doesn't work and I can't find how to fix it:
foundBox = Camshift.Process(probabilityMap, searchArea, MeanShift.DEFAULT_TERM, out centralMoments); (line 166 in Kalman2dTrackingDemo.cs)
The errors: 'Camshift' / 'MeanShift' does not contain a definition for 'Process' / 'DEFAULT_TERM'
It doesn't work when you select upgrade automatically when you open the solution by Visual Studio 2017 after upgrade Windows 8.1 SDK to Windows 10 SDK.
Are there any plans or ETA for this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.