Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
@Home rocking some AI projects

El Bruno elbruno

💭
@Home rocking some AI projects
View GitHub Profile
@elbruno
elbruno / opencvnet5googlenet.cs
Created Nov 25, 2020
opencvnet5googlenet.cs
View opencvnet5googlenet.cs
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Dnn;
using OpenCvSharp.Extensions;
using Point = OpenCvSharp.Point;
using Size = OpenCvSharp.Size;
@elbruno
elbruno / opencvnet5agegenderestimation.cs
Created Nov 23, 2020
opencvnet5agegenderestimation.cs
View opencvnet5agegenderestimation.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Dnn;
using OpenCvSharp.Extensions;
using Point = OpenCvSharp.Point;
using Size = OpenCvSharp.Size;
@elbruno
elbruno / net5opencvdacedetdnn.cs
Created Nov 17, 2020
net5opencvdacedetdnn.cs
View net5opencvdacedetdnn.cs
using System;
using System.Threading;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Dnn;
using OpenCvSharp.Extensions;
using Point = OpenCvSharp.Point;
using Size = OpenCvSharp.Size;
namespace Demo08_WinFormFaceDetectionDNN
@elbruno
elbruno / net5opencvdacedetcascades.cs
Created Nov 16, 2020
net5opencvdacedetcascades.cs
View net5opencvdacedetcascades.cs
using System;
using System.Threading;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using Point = OpenCvSharp.Point;
using Size = OpenCvSharp.Size;
namespace Demo07_WinFormFaceDetectionCascades
{
@elbruno
elbruno / net5opencvlivecamera.cs
Created Nov 15, 2020
net5opencvlivecamera.cs
View net5opencvlivecamera.cs
using System;
using System.Threading;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using Point = OpenCvSharp.Point;
using Size = OpenCvSharp.Size;
namespace Demo04_WinForm
{
@elbruno
elbruno / net5opencvtakephoto.cs
Last active Nov 15, 2020
net5opencvtakephoto.cs
View net5opencvtakephoto.cs
using System;
using System.Windows.Forms;
using OpenCvSharp;
namespace Demo03_WinForm
{
public partial class Form1 : Form
{
private VideoCapture _capture;
private Mat _image;
@elbruno
elbruno / opencvsharpnet5Fasteffect.cs
Created Nov 12, 2020
opencvsharpnet5Fasteffect.cs
View opencvsharpnet5Fasteffect.cs
public Mat applyEffect(Mat image)
{
var newImage = new Mat();
Cv2.CvtColor(image, newImage, ColorConversionCodes.BGR2GRAY, 0);
KeyPoint[] keypoints = Cv2.FAST(newImage, 50, true);
foreach (KeyPoint kp in keypoints)
newImage.Circle((Point)kp.Pt, 3, Scalar.Red, -1, LineTypes.AntiAlias, 0);
return newImage;
}
@elbruno
elbruno / opencvsharpnet5cannyeffect.cs
Created Nov 11, 2020
opencvsharpnet5cannyeffect.cs
View opencvsharpnet5cannyeffect.cs
using OpenCvSharp;
var capture = new VideoCapture(0);
var window = new Window("El Bruno - OpenCVSharp Effects demo");
var image = new Mat();
var imageNew = new Mat();
bool applyCanny = false;
bool run = true;
while (run)
{
@elbruno
elbruno / opencvsharpnetcore5showcamera.cs
Created Nov 10, 2020
opencvsharpnetcore5showcamera
View opencvsharpnetcore5showcamera.cs
using OpenCvSharp;
var capture = new VideoCapture(0);
var window = new Window("El Bruno - OpenCVSharp demo");
var image = new Mat();
while (true)
{
capture.Read(image);
if (image.Empty())
break;
window.ShowImage(image);
@elbruno
elbruno / opencvsharpshowcamera.cs
Created Nov 10, 2020
opencvsharpshowcamera.cs
View opencvsharpshowcamera.cs
using OpenCvSharp;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
using var capture = new VideoCapture(0);
using var window = new Window("El Bruno - OpenCVSharp demo");
You can’t perform that action at this time.