Giter VIP home page Giter VIP logo

dot-imaging's People

Contributors

dajuric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dot-imaging's Issues

No dependencies?

I don't understand this comment in the readme file.

lightweight (no 3rd party dependencies), but powerful

Dot-Imaging has OpenCV dependencies in the Source/IO/UnmanagedLibraries folder. Please help me understand. Thanks.

VideoWriter doesn't work in 2.5.6

After updating to version 2.5.6 the VideoWriter doesn't work. Reverting back to 2.5.4 works fine.

DotImaging.ImageStreamReader reader = new DotImaging.ImageDirectoryCapture(recordFolder, "*.png");
float fps = Convert.ToSingle(1 / secondsPerFrame);
DotImaging.ImageStreamWriter writer = new DotImaging.VideoWriter(fileName, viewSize, fps);
writer.Open();
foreach (var image in reader)
{
    writer.Write(image);
}
writer.Close();

.Net Standard Libraries.

Hello,
Could we have libraries as .net standard? It would make them usable in both .net framework and core etc.

NuGet Error: Unable to find version 2.4.8 of package OpenCV.ffmpeg.overlay-Win32_v110

Installing only the appropriate packages as per https://github.com/dajuric/dot-imaging via NuGet. When trying to build, I get:

NuGet Error: Unable to find version 2.4.8 of package OpenCV.ffmpeg.overlay-Win32_v110

Target .NET = 4.5

Files exist. Copying them to Debug/Release makes no difference. Referencing explicit references makes no difference.

OpenCV.Net package version is 3.3.1 (does DotImaging work with 3.3.1? Guessing not?).

Is this a documentation issue more than anything? :) NuGet installation steps below.

NuGet:

PM> install-package opencv.net

Attempting to gather dependency information for package 'opencv.net.3.3.1' with respect to project 'Probe.Video', targeting '.NETFramework,Version=v4.5'
Gathering dependency information took 48.17 ms
Attempting to resolve dependencies for package 'opencv.net.3.3.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'opencv.net.3.3.1'
Resolved actions to install package 'opencv.net.3.3.1'
Found package 'OpenCV.Net 3.3.1' in '[dir]\packages'.
Package 'OpenCV.Net.3.3.1' already exists in folder '[dir]\packages'
Added package 'OpenCV.Net.3.3.1' to 'packages.config'
Successfully installed 'OpenCV.Net 3.3.1' to Probe.Video
Executing nuget actions took 939.6 ms
Time Elapsed: 00:00:05.2241218

PM> install-package DotImaging.IO

Attempting to gather dependency information for package 'DotImaging.IO.4.8.3' with respect to project 'Probe.Video', targeting '.NETFramework,Version=v4.5'
Gathering dependency information took 931.97 ms
Attempting to resolve dependencies for package 'DotImaging.IO.4.8.3' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'DotImaging.IO.4.8.3'
Resolved actions to install package 'DotImaging.IO.4.8.3'
Found package 'DotImaging.Primitives2D 4.8.3' in '[dir]\packages'.
Found package 'DotImaging.GenericImage 4.8.3' in '[dir]\packages'.
Found package 'DotImaging.IO 4.8.3' in '[dir]\packages'.
Package 'DotImaging.Primitives2D.4.8.3' already exists in folder '[dir]\packages'
Added package 'DotImaging.Primitives2D.4.8.3' to 'packages.config'
Successfully installed 'DotImaging.Primitives2D 4.8.3' to Probe.Video
Package 'DotImaging.GenericImage.4.8.3' already exists in folder '[dir]\packages'
Added package 'DotImaging.GenericImage.4.8.3' to 'packages.config'
Successfully installed 'DotImaging.GenericImage 4.8.3' to Probe.Video
Package 'DotImaging.IO.4.8.3' already exists in folder '[dir]\packages'
Added package 'DotImaging.IO.4.8.3' to 'packages.config'
Successfully installed 'DotImaging.IO 4.8.3' to Probe.Video
Executing nuget actions took 1.98 sec
Time Elapsed: 00:00:03.7888188

PM> install-package Accord

Attempting to gather dependency information for package 'Accord.3.6.0' with respect to project 'Probe.Video', targeting '.NETFramework,Version=v4.5'
Gathering dependency information took 111.71 ms
Attempting to resolve dependencies for package 'Accord.3.6.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Accord.3.6.0'
Resolved actions to install package 'Accord.3.6.0'
Retrieving package 'Accord 3.6.0' from 'nuget.org'.
  GET https://api.nuget.org/packages/accord.3.6.0.nupkg
  OK https://api.nuget.org/packages/accord.3.6.0.nupkg 41ms
Installing Accord 3.6.0.
Adding package 'Accord.3.6.0' to folder '[dir]\packages'
Added package 'Accord.3.6.0' to folder '[dir]\packages'
Added package 'Accord.3.6.0' to 'packages.config'
Successfully installed 'Accord 3.6.0' to Probe.Video
Executing nuget actions took 2.82 sec
Time Elapsed: 00:00:03.4612951
PM> install-package DotImaging.Primitives2D
Package 'DotImaging.Primitives2D.4.8.3' already exists in project 'Probe.Video'
Time Elapsed: 00:00:01.0765887
PM> install-package DotImaging.IO
Package 'DotImaging.IO.4.8.3' already exists in project 'Probe.Video'
Time Elapsed: 00:00:00.5238896
PM> install-package DotImaging.BitmapInterop

Attempting to gather dependency information for package 'DotImaging.BitmapInterop.4.8.3' with respect to project 'Probe.Video', targeting '.NETFramework,Version=v4.5'
Gathering dependency information took 714.63 ms
Attempting to resolve dependencies for package 'DotImaging.BitmapInterop.4.8.3' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'DotImaging.BitmapInterop.4.8.3'
Resolved actions to install package 'DotImaging.BitmapInterop.4.8.3'
Retrieving package 'DotImaging.BitmapInterop 4.8.3' from 'nuget.org'.
Adding package 'DotImaging.BitmapInterop.4.8.3' to folder '[dir]\packages'
Added package 'DotImaging.BitmapInterop.4.8.3' to folder '[dir]\packages'
Added package 'DotImaging.BitmapInterop.4.8.3' to 'packages.config'
Successfully installed 'DotImaging.BitmapInterop 4.8.3' to Probe.Video
Executing nuget actions took 1.05 sec
Time Elapsed: 00:00:02.3796397
PM> 

DotImaging.ImageIO not 'visible' in .NET core 2.0 on windows

When I add the package DotImaging.IO in my .NET Core 2.0 project under windows in Visual Studio the ImageIO class is not visible. The nuget also tells me:

xxx.csproj : warning NU1701: Package 'DotImaging.GenericImage 4.8.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
xxx.csproj : warning NU1701: Package 'DotImaging.Primitives2D 4.8.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

Signing Assemblies

Hey.

Great projects. I am in love with them. Just starting to figure them all out, but I do have one request. That you sign the assemblies with a key file. We run our code with other libraries and we require our libraries to be signed.

I can compile and sign your code my self, but for the nuget packages, they cannot unless you do it. Can you make sure that you sign the assemblies please?

Many thanks!

Compile without OpenCv Dependencies?

If I don't care about OpenCv Interoperability or Drawing on images, is there a way to compile this library so there are no need for the opencv unmanaged dlls?

I'd like to use these assemblies, just not the opencv stuff.

Thanks,
Darren

Unicode Filename

Hi
I'm using FileCapture. all things worked corrcetly but when i use video file with Unicode name i get this error:
"Cannot open FileStream!"

VideoWriter - Video files with broken or missing index

Video files are generated with broken or missing index (VLC message), independently by the video codec.
To isolate the problem the very basic sequence of calls is:

cameraCapture = new CameraCapture(1);
String name = @"C:\Users\fidanken\Documents\dotImaging.avi";
VideoCodec videoCodec = new VideoCodec("UserSelection");
cameraCapture.Open();
go = true;
await GoAsync();

private async Task GoAsync()
{    
    while (go)
    {
    frameIImage = await cameraCapture.ReadAsync(); //reads stream asynchronously
    await videoWriter.WriteAsync(frameIImage);    
    }      
}

go = false;
videoWriter.Close();
videoWriter.Dispose();

It seems to me that somehow, when calling Close() and/or Dispose() (I tried multiple combinations), the files are not correctly closed.

Thank You for any help

Nothing happens :-(

Hi
I have this code writen:

using DotImaging;
using System;
using System.Windows.Forms;

namespace youtube_new_c
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            var sourceName = String.Empty;

            var pipeName = new Uri("https://www.youtube.com/watch?v=Vpg9yizPP_g").NamedPipeFromYoutubeUri(); //Youtube

            sourceName = String.Format(@"\\.\pipe\{0}", pipeName);

            
            ImageStreamReader reader = new FileCapture(sourceName);
            reader.Open();

            //seek if you can
            if (reader.CanSeek)
                reader.Seek((int)(reader.Length * 0.25), System.IO.SeekOrigin.Begin);

            //read video frames
            Bgr<byte>[,] frame = null;
            do
            {
                reader.ReadTo(ref frame);
                if (frame == null)
                    break;
                
                frame.Show(scaleForm: true);
                ((double)reader.Position / reader.Length).Progress();
            }
            while (!(Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Escape));

        }
    }
}

and when run i got a black window, one empty form and another form with a progressbar but nothing happens. Any idea of what i need to do?
Thanks

Target .NET Core 2.2 ?

The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2

Why is that a requirement in order to run the samples, when 2.2 reached end of life last year?

FastTemplateMatchingDemo Pyramid Depth

What's the secret sauce to getting multiple levels of the pyramid? I changed this line by adding the neighborhoodPerLevel parameter.

linPyr = LinearizedMapPyramid.CreatePyramid(grayIm, neigborhoodPerLevel: new int[] { 5, 5 }); //prepare linear-pyramid maps

And this line by adding the maxNumberOfFeaturesPerLevel parameter.

var tp = TemplatePyramid.CreatePyramidFromPreparedBWImage(preparedBWImage, new FileInfo(file).Name /*"OpenHand"*/,  maxNumberOfFeaturesPerLevel: new int[] { 100, 100 });

And what I get is Debug.Assert thrown from from the second iteration of matchTemplate->calculateSimilarityMap->neighbourMap.AddTo()->AddTo() method because src.Width does not equal dst.Width nor does src.Height equal dst.Height.

I also think I found a bug. Shouldn't sourceImage be image after the var t = new T();
Before:

public static ImageTemplatePyramid<T> CreatePyramidFromPreparedBWImage(Gray<byte>[,] sourceImage, string classLabel, int minFeatureStrength = 40, int minNumberOfFeatures = 30, int[] maxNumberOfFeaturesPerLevel = null)
{
    return CreatePyramid<Gray<byte>>(sourceImage, classLabel,
                                    (image, minFeatures, maxFeatures, label) =>
                                    {
                                        var t = new T();
                                        t.Initialize(sourceImage, minFeatureStrength, maxFeatures, label);
                                        return t;
                                    },
                                    minNumberOfFeatures, maxNumberOfFeaturesPerLevel);
}

After:

public static ImageTemplatePyramid<T> CreatePyramidFromPreparedBWImage(Gray<byte>[,] sourceImage, string classLabel, int minFeatureStrength = 40, int minNumberOfFeatures = 30, int[] maxNumberOfFeaturesPerLevel = null)
{
    return CreatePyramid<Gray<byte>>(sourceImage, classLabel,
                                    (image, minFeatures, maxFeatures, label) =>
                                    {
                                        var t = new T();
                                        t.Initialize(image, minFeatureStrength, maxFeatures, label);
                                        return t;
                                    },
                                    minNumberOfFeatures, maxNumberOfFeaturesPerLevel);
}

problem loading 12 bit tiff file

Hi,

Thanks for this awesome lib :) I just ave problem with 12bit tiff. The first one throw an exception (External component has thrown an exception.) while the second one crash the app with a System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

Any advice ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.