emgucv

Find Tables in Image using C#

99封情书 提交于 2019-12-23 05:22:47
问题 I am trying to write a function that will take an image and return me a list of images with only tables using EMGU.CV or Magick.Net or AForge.Net for example for the below image the function should return 2 images with the two tables in the image. private static List<Image> FindTables(Image img) { var masterImage = (Bitmap)img; var image = new Image<Gray, byte>(masterImage); var copyImg = new Image<Bgr, byte>(masterImage); List<Image> tables = new List<Images> //Find all tables and add to

Find Tables in Image using C#

爷,独闯天下 提交于 2019-12-23 05:22:13
问题 I am trying to write a function that will take an image and return me a list of images with only tables using EMGU.CV or Magick.Net or AForge.Net for example for the below image the function should return 2 images with the two tables in the image. private static List<Image> FindTables(Image img) { var masterImage = (Bitmap)img; var image = new Image<Gray, byte>(masterImage); var copyImg = new Image<Bgr, byte>(masterImage); List<Image> tables = new List<Images> //Find all tables and add to

How to get coordinates of pixel after shape was rectified?

拜拜、爱过 提交于 2019-12-23 05:11:40
问题 I'm using EmguCV wrapper for OpenCV and I'm rectifing this shape: with help of this code: public Image<Bgr,byte> Rectify() { try { Image<Bgr, byte> warped_Image = new Image<Bgr, byte>(input_Image.Width, input_Image.Height); MCvScalar s = new MCvScalar(0, 0, 0); PointF[] dsts = new PointF[4]; dsts[0] = new PointF(0, 0); dsts[2] = new PointF(0, input_Image.Height); dsts[3] = new PointF(input_Image.Width, input_Image.Height); dsts[1] = new PointF(input_Image.Width, 0); HomographyMatrix mywarpmat

Connect to IP Camera Using Emgu CV's Capture = New Capture()

久未见 提交于 2019-12-23 03:10:07
问题 Using Visual Basic 2008 and Emgu CV, I can capture the stream of a webcam on my PC. What I want to do is connect to an IP camera, knowing its URL, using Capture = New Capture(). Here is the code I have: Imports Emgu.CV Imports Emgu.CV.Util Imports Emgu.CV.Structure Public Class Form1 Dim capturez As Capture = New Capture("rtsp://[IP Address]/mpeg4/media.amp") Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim imagez As Image(Of Bgr,

How can I detect direction and number of objects using Emgu?

本小妞迷上赌 提交于 2019-12-23 02:28:11
问题 How can I detect direction and number of objects using Emgu? Objects are moving in all directions (2D); and a camera is seeing these objects (on a 2D surface). Object may have little differences in shape but are similar enough. Thanks 回答1: Invoke cvAbsDiff on successive frames (may be on each n -th and (n - gap) -th frame) to detect changes and use thresholding in order to get a changes mask For each frame call cvUpdateMotionHistory and pass obtained mask as an argument To get motion segments

How do I get a .NET Bitmap and an OpenCV image to point to the same chunk of memory?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 01:27:08
问题 How do I get a .NET Bitmap and an OpenCV image to point to the same chunk of memory? I know that I can copy from one to the other, but I would prefer that they just point to the same pixels. Bonus points for a solution using Emgu. 回答1: Following is just a theory and might not work, I'm not very experienced with opencv/emgucv Both System.Drawing.Bitmap and Emgu.CV.Image have constructors taking scan0 as an argument. You can allocate memory for image and pass this pointer to that constructors.

Tracking blobs with OpenCV

我怕爱的太早我们不能终老 提交于 2019-12-21 22:26:18
问题 I have an EMGU (openCV wrapper) program that subtracts the background from a camera feed and extracts nice clean blobs. Now I need something that will track these blobs and assign them with IDs. Any suggestions/libraries ? Thanks, SW 回答1: well if you have multiple objects that you would like to track you could try a Particle Filter. Particle filters basically "disposes" particles on the image which each have a certain weight. In each time step these weights are then updated by comparing them

Bitmap class in WPF

泪湿孤枕 提交于 2019-12-21 19:51:14
问题 I'm working with Emgu Cv in Winforms to do face recognition using Kinect. Now, i want to move to WPF. However, the EmguCv library support only Bitmap class. Can i use the Bitmap class (used in Winforms) in WPF ? if not, is there an other method to use Emgu cv with kinect in WPF? Thanks. 回答1: System.Drawing.Bitmap can not be used directly as image source for WPF, so you have to convert it to System.Windows.Media.Imaging.BitmapSource. The best way to do it is by using Imaging

EmguCV Cut Face+Neck Skin Only And Save New Image

寵の児 提交于 2019-12-21 17:56:54
问题 In my app, I will input a human image and I want to get the face and neck only of that person as output in separate image. Example: Below image as input:(Source:http://www.fremantlepress.com.au) And I want to get the up image as output: I want to perform the following algorithm: 1. Detect face 2. Select (face region * 2) area 3. Detect skin and neck 4. Cut the skin region of the selected image 5. Save that cut region into a new image As going through the EmguCV wiki and other online resources

what is the function to find otsu threshold in emgu cv?

别等时光非礼了梦想. 提交于 2019-12-21 17:35:03
问题 I don't need the thresholded image. I want the threshold. I found this in OpenCV. cv::threshold( orig_img, thres_img, 0, 255, CV_THRESH_BINARY+CV_THRESH_OTSU ); Is there an equivalent in EmguCv. Thanks in advance. PS. I need to use this threshold for canny edge detector 回答1: You can refer this code for Auto Canny Edge detector! Image<Gray, byte> Img_Source_Gray = Img_Org_Gray.Copy(); Image<Gray, byte> Img_Egde_Gray = Img_Source_Gray.CopyBlank(); Image<Gray, byte> Img_SourceSmoothed_Gray = Img