Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding CvMat support, multi-camera capture, image encoding and decodi…
…ng functions, changing licence to Apache 2.0
- Loading branch information
Showing
93 changed files
with
2,629 additions
and
1,451 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
|
||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>DotImaging.Core.Platform</id> | ||
<version>$version$</version> | ||
<title>DotImaging.Core.Platform</title> | ||
<authors>Darko Jurić</authors> | ||
<owners>DotImaging</owners> | ||
<licenseUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Licence.txt</licenseUrl> | ||
<projectUrl>https://github.com/dajuric/dot-imaging</projectUrl> | ||
<iconUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Logo/logo-small.png</iconUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<description> | ||
Provides the portable way to determine the execution platform. | ||
For now, .NET 4.5 only! | ||
</description> | ||
<summary> | ||
Provides the portable way to determine the execution platform. | ||
Provides some additional platform related interoperability functions. | ||
</summary> | ||
<tags>execution-platform, OS, portable</tags> | ||
|
||
<dependencies> | ||
</dependencies> | ||
</metadata> | ||
|
||
<files> | ||
<file src="..\..\..\Source\Core\Platform.cs" target="content\net45\DotImaging\Platform.cs" /> | ||
<file src="readmePlatform.txt" target="readme.txt" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Provides the portable way to determine the execution platform. | ||
Provides some additional platform related interoperability functions. | ||
|
||
1) | ||
Console.WriteLine(Platform.RunningPlatform); //Windows, Linux, MacOS | ||
|
||
2) (tried only on Windows) | ||
Platform.AddDllSearchPath(); //adds the "UnmanagedLibraries/<your platform>/<version>/" to the path (e.g. UnmanagedLibraries/Windows/x64) | ||
|
||
3) | ||
string pathToFile = @"bin\SomeFolder/SomeFolder2\\yourFile.txt"; | ||
pathtoFile = pathtoFile.NormalizePathDelimiters(); //outputs "bin\\SomeFolder\\SomeFolder2\\yourFile.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,48 @@ | ||
<?xml version="1.0"?> | ||
|
||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>DotImaging.IO</id> | ||
<version>$version$</version> | ||
<title>DotImaging.IO</title> | ||
<authors>Darko Jurić</authors> | ||
<owners>DotImaging</owners> | ||
<licenseUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Licence.txt</licenseUrl> | ||
<projectUrl>https://github.com/dajuric/dot-imaging</projectUrl> | ||
<iconUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Logo/logo-small.png</iconUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<description> | ||
Provides unified API for IO video access: web-camera support, various video-format reading / writing, image-directory reader and functions for image reading and writing. | ||
All operations on image streams are standard stream operations and do not depend on actual video source. | ||
The library is made in platform-abstract fashion. | ||
</description> | ||
<summary>Provides unified API for IO video and image access.</summary> | ||
<tags>video-capture image-IO</tags> | ||
|
||
<dependencies> | ||
<dependency id="DotImaging.GenericImage" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
|
||
<files> | ||
<file src="..\..\..\bin\Release\DotImaging.IO.dll" target="lib\net45\DotImaging.IO.dll" /> | ||
<file src="..\..\..\bin\Release\DotImaging.IO.xml" target="lib\net45\DotImaging.IO.xml" /> | ||
|
||
<!--Unmanaged Libraries--> | ||
<!--x86--> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_core248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_core248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_ffmpeg248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_ffmpeg248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_highgui248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_highgui248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_video248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_video248.dll" /> | ||
|
||
<!--x64--> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_core248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_core248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_ffmpeg248_64.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_ffmpeg248_64.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_highgui248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_highgui248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_video248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_video248.dll" /> | ||
|
||
<!--PostBuild tasks--> | ||
<file src="IO.targets" target="build\DotImaging.IO.targets" /> | ||
|
||
<file src="readmeIO.txt" target="readme.txt" /> | ||
</files> | ||
<?xml version="1.0"?> | ||
|
||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>DotImaging.IO</id> | ||
<version>$version$</version> | ||
<title>DotImaging.IO</title> | ||
<authors>Darko Jurić</authors> | ||
<owners>DotImaging</owners> | ||
<licenseUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Licence.txt</licenseUrl> | ||
<projectUrl>https://github.com/dajuric/dot-imaging</projectUrl> | ||
<iconUrl>https://raw.githubusercontent.com/dajuric/dot-imaging/master/Deployment/Logo/logo-small.png</iconUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<description> | ||
Unified stream-like platform-abstract API for IO video access: web-camera support, various video-format reading / writing, image-directory reader. | ||
Image loading/saving (file or in-memory). | ||
</description> | ||
<summary>Loading and saving images and image streams (file, in-memory, camera, video, directory).</summary> | ||
<tags>image-encode, image-decode, image-load, image-save, image-directory, camera-capture, multiple-camera-capture, video-capture, video-write</tags> | ||
|
||
<dependencies> | ||
<dependency id="DotImaging.GenericImage" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
|
||
<files> | ||
<file src="..\..\..\bin\Release\DotImaging.IO.dll" target="lib\net45\DotImaging.IO.dll" /> | ||
<file src="..\..\..\bin\Release\DotImaging.IO.xml" target="lib\net45\DotImaging.IO.xml" /> | ||
|
||
<!--Unmanaged Libraries--> | ||
<!--x86--> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_core248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_core248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_ffmpeg248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_ffmpeg248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_highgui248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_highgui248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x86\opencv_video248.dll" target="native\UnmanagedLibraries\Windows\x86\opencv_video248.dll" /> | ||
|
||
<!--x64--> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_core248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_core248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_ffmpeg248_64.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_ffmpeg248_64.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_highgui248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_highgui248.dll" /> | ||
<file src="..\..\..\bin\Release\UnmanagedLibraries\Windows\x64\opencv_video248.dll" target="native\UnmanagedLibraries\Windows\x64\opencv_video248.dll" /> | ||
|
||
<!--PostBuild tasks--> | ||
<file src="IO.targets" target="build\DotImaging.IO.targets" /> | ||
|
||
<file src="readmeIO.txt" target="readme.txt" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,47 @@ | ||
Provides unified API for IO video access: web-camera support, various video-format reading / writing, image-directory reader and functions for image reading and writing. | ||
All operations on image streams are standard stream operations and do not depend on actual video source. | ||
The library is made in platform-abstract fashion. | ||
|
||
1) image loading / saving: | ||
|
||
Bgr<byte>[,] image = ImageIO.LoadColor("sample.jpg"); //load Bgr color image | ||
Gray<float>[,] hdrImage = (ImageIO.LoadUnchanged("hdrImage.png") as Image<Gray<float>>).Clone(); //load HDR grayscale (or any other) image | ||
|
||
image.Save("image.png"); | ||
|
||
|
||
2) media (camera, video, image-directory) capture: | ||
|
||
ImageStreamReader reader = new CameraCapture(); //use specific class for device-specific properties (e.g. exposure, image name, ...) | ||
reader.Open(); | ||
|
||
//read single frame | ||
var frame = reader.ReadAs<Bgr<byte>>(); | ||
|
||
//read the rest of images (do not do that with the CameraCapture :) ) | ||
foreach(var image in reader) | ||
{ | ||
//do something with the image | ||
} | ||
|
||
reader.Close(); | ||
|
||
3) video writer: | ||
|
||
ImageStreamWriter videoWriter = new VideoWriter("out.avi", new Size(1280, 1024)); | ||
|
||
var image = new Bgr<byte>[1024, 1280]; | ||
videoWriter.Write(image.Lock()); //write a single frame | ||
|
||
videoWriter.Close(); | ||
|
||
|
||
Discover more types as you type :) | ||
|
||
|
||
Unified stream-like platform-abstract API for IO video access: web-camera support, various video-format reading / writing, image-directory reader. | ||
Image loading/saving (file or in-memory). | ||
|
||
1) image loading / saving: | ||
|
||
Bgr<byte>[,] image = ImageIO.LoadColor("sample.jpg"); //load Bgr color image | ||
Gray<float>[,] hdrImage = (ImageIO.LoadUnchanged("hdrImage.png") as Image<Gray<float>>).Clone(); //load HDR grayscale (or any other) image | ||
image.Save("image.png"); | ||
|
||
|
||
2) image in-memory encoding / decoding | ||
|
||
Bgr<byte>[,] bgrIm = ImageIO.LoadColor("sample.jpg"); | ||
byte[] encodedBgr = bgrIm.EncodeAsJpeg(); //or png, bmp | ||
Bgr<byte>[,] decodedBgr = encodedBgr.DecodeAsColorImage(); | ||
|
||
|
||
3) media (camera, video, image-directory) capture: | ||
|
||
ImageStreamReader reader = new CameraCapture(); //use specific class for device-specific properties (e.g. exposure, image name, ...) | ||
reader.Open(); | ||
|
||
//read single frame | ||
var frame = reader.ReadAs<Bgr<byte>>(); | ||
|
||
//read the rest of images (do not do that with the CameraCapture :) ) | ||
foreach(var image in reader) | ||
{ | ||
//do something with the image | ||
} | ||
|
||
reader.Close(); | ||
|
||
|
||
4) video writer: | ||
|
||
ImageStreamWriter videoWriter = new VideoWriter("out.avi", new Size(1280, 1024)); | ||
|
||
var image = new Bgr<byte>[1024, 1280]; | ||
videoWriter.Write(image.Lock()); //write a single frame | ||
|
||
videoWriter.Close(); | ||
|
||
|
||
Discover more types as you type :) | ||
|
||
|
Oops, something went wrong.