Accord.NET PointsMarker.csは、PixelFormat Format32bppArgbをサポートしているようです。 これはなぜUnsupportedImageFormatExceptionをキャッチしますか?UnsupportedImageFormatExceptionを修復する方法PixelFormat Format32bppArgb?
private void Harris()
{
try
{
img1 = new Bitmap(pictureBox1A.Image);
img2 = new Bitmap(pictureBox1B.Image);
var harris = new HarrisCornersDetector(0.04f, 1000f);
harrisPoints1 = harris.ProcessImage(img1).ToArray();
harrisPoints2 = harris.ProcessImage(img2).ToArray();
// Show the marked points in the original images
var img1mark = new PointsMarker(harrisPoints1).Apply(img1);
var img2mark = new PointsMarker(harrisPoints2).Apply(img2);
// Concatenate the two images together in a single image
var concatenate = new Concatenate(img1mark);
pictureBox.Image = concatenate.Apply(img2mark);
}
catch (UnsupportedImageFormatException)
{
const string S = "UnsupportedImageFormatException PixelFormat ";
Console.WriteLine(S + img1.PixelFormat);
Console.WriteLine(S + img2.PixelFormat);
}
}
Format32bppArgbが、私はそれを修復することができましたAccord.NET PointsMarker.csソースでサポートされているようだが、Console.WriteLineをが
UnsupportedImageFormatExceptionピクセルフォーマットFormat32bppArgb UnsupportedImageFormatExceptionピクセルフォーマットFormat32bppArgb
属性はSOで必要です。 http://stackoverflow.com/a/2016509/17034 –
申し訳ありません。私の悪い。私は通常やります。 – jacknad