다음 함수를 사용하여 문제를 해결할 수 있지만이를 호출하는 방법, 특히 "List ImgLetters out"부분을 이해할 수 없습니다. 우리가 추출하려고하는 BLOB (수 - 모양이C# 및 Aforge - 모양에서 이미지 추출
INT LettersCount를 찾을 수 사진 -
public static bool ApplyBlobExtractor (Bitmap SourceImg, int LettersCount, out List<Bitmap> ImgLetters)
비트 맵 SourceImg :
public static bool ApplyBlobExtractor (Bitmap SourceImg, int LettersCount, out List<Bitmap> ImgLetters)
{
ImgLetters = null;
ImgLetters = new List<Bitmap>();
BlobCounter blobCounter = new BlobCounter();
// Sort order
blobCounter.ObjectsOrder = ObjectsOrder.XY;
blobCounter.ProcessImage (SourceImg);
Blob[] blobs = blobCounter.GetObjects (SourceImg, false);
// Adding images into the image list
UnmanagedImage currentImg;
foreach (Blob blob in blobs)
{
currentImg = blob.Image;
ImgLetters.Add (currentImg.ToManagedImage());
}
return ImgLetters.Count == LettersCount;
}
지금이에서보기를 할 수 있습니다)
out 목록 ImgLetters - ???
세 번째 매개 변수는 무엇을합니까? (이 함수를 호출하는 방법)
Bitmap image1 = new Bitmap(@"C:\1.png");
..
ApplyBlobExtractor (image1, 1, ???)
..
image2.save(@"C:\2.png")
그러나 나는 이미 모든 것을이 함수를 호출한다 남아 .. 코드를 찾는 모든 일을했다가 .. 당신은 적어도 어떤 세번째 매개 변수를 설명 할 수 이 문제를 해결하기 위해 몇 시간을 보냈기 때문에 그렇습니다. – Alex
P. 나는 오해로 인해 질문을 편집했습니다. – Alex