“过滤器不支持源像素格式”。 - Aforge形态和扩张 [英] "Source pixel format is not supported by the filter" - Aforge Morphology and Dilatation

查看:220
本文介绍了“过滤器不支持源像素格式”。 - Aforge形态和扩张的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

裁剪,Covnerting到灰色,灰色到黑色和白色似乎工作正常但我有形态问题 - 它来自Aforge图书馆。







 ' 打开形态学 
Dim x As Bitmap = PictureBox3.Image
Dim filterOpening 作为 打开()
PictureBox4.Image = filterOpening.Apply(x)

' DILATION
Dim filterDilatation 作为 扩张()
Dim dil As Bitmap = filterDilatation.Apply(PictureBox4.Image)
图片Box5.Image = dil





应该是什么问题?我试过了。像素格式。但它无法正常工作。

解决方案

终于。在这里找到答案。 [ ^ ]

< br $> b $ b

  Dim  bmp32bpp  As  Bitmap = bmp8bppIndexed.Clone _ 
New Rectangle(Point.Empty,bmp8bppIndexed.Size),_
Imaging.PixelFormat。 Format32bppArgb)


Cropping, Covnerting to Gray , Gray to Black and White seems to be working fine but I have problem with Morphology - it is from Aforge Library.



'MAKE OPENING MORPHOLOGY
Dim x As Bitmap = PictureBox3.Image
Dim filterOpening As New Opening()
PictureBox4.Image = filterOpening.Apply(x)

'DILATION
Dim filterDilatation As New Dilatation()               
Dim dil As Bitmap = filterDilatation.Apply(PictureBox4.Image)
PictureBox5.Image = dil



what should be the problem? I tried. Pixel Format. but it is not working.

解决方案

finally. Found the answer here.[^]


Dim bmp32bpp As Bitmap = bmp8bppIndexed.Clone _
 (New Rectangle(Point.Empty, bmp8bppIndexed.Size), _
 Imaging.PixelFormat.Format32bppArgb)


这篇关于“过滤器不支持源像素格式”。 - Aforge形态和扩张的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆