1

私は血液の画像を持っていて、それに流域を適用しました..それは機能し、細胞を決定しますが、各細胞を別々の画像に入れる方法がわかりません..私はemgu.cvで作業しています.助けを得ることができますか

ここでは、流域法を使用して画像をセグメント化し、元の画像にマーカーを配置します

Image<Gray, Int32> boundaryImage = watershedSegmenter.Process(image);
Image<Gray, Byte> test = watershedSegmenter.GetWatersheds(); Image<Bgr, byte>dest=new Image<Bgr, byte>(image.Width, image.Height);
dest = image.And(image, test);            
pictureBox1.Width = boundaryImage.ToBitmap().Width;
pictureBox1.Height = boundaryImage.ToBitmap().Height;
pictureBox1.BackgroundImage = boundaryImage.ToBitmap();
4

1 に答える 1

0

EMGUcv cvWatershed() にはまだ解決されていないバグがいくつかあるようです。マーカー画像は常に白い画像を返します。第 1 段階の出力イメージを共有できますか? このコードを使用して画像を表示できません。

Image<Bgr, Byte> image = Img_Source_Bgr.Copy();
Image<Gray, Int32> marker = new Image<Gray, Int32>(image.Width, image.Height);
Rectangle rect = image.ROI;
marker.Draw(
new CircleF(
new PointF(rect.Left + rect.Width / 2.0f, rect.Top + rect.Height / 2.0f),
    /*(float)(Math.Min(image.Width, image.Height) / 20.0f)*/ 5.0f),
new Gray(255),
0);
Image<Bgr, Byte> result = image.ConcateHorizontal(marker.Convert<Bgr, byte>());
Image<Gray, Byte> mask = new Image<Gray, byte>(image.Size);
CvInvoke.cvWatershed(image, marker);
CvInvoke.cvCmpS(marker, 0.10, mask, CMP_TYPE.CV_CMP_GT);

imageBox1.Image = mask;
于 2014-07-04T12:21:18.570 に答える