Updated Document Layout Analysis (markdown)

BobLd
2026-02-28 16:48:34 +00:00
parent 213761f7dd
commit 423fd8152f

@@ -299,8 +299,8 @@ var blocks = recursiveXYCut.GetBlocks(words);
var recursiveXYCut = new RecursiveXYCut(new RecursiveXYCut.RecursiveXYCutOptions()
{
MinimumWidth = page.Width / 3.0,
DominantFontWidthFunc = _ => page.Letters.Average(l => l.GlyphRectangle.Width),
DominantFontHeightFunc = _ => page.Letters.Average(l => l.GlyphRectangle.Height)
DominantFontWidthFunc = _ => page.Letters.Average(l => l.BoundingBox.Width),
DominantFontHeightFunc = _ => page.Letters.Average(l => l.BoundingBox.Height)
});
var blocks = recursiveXYCut.GetBlocks(words);
@@ -312,8 +312,8 @@ var blocks = recursiveXYCut.GetBlocks(words);
var recursiveXYCut = new RecursiveXYCut(new RecursiveXYCut.RecursiveXYCutOptions()
{
MinimumWidth = page.Width / 3.0,
DominantFontWidthFunc = letters => letters.Select(l => l.GlyphRectangle.Width).Average(),
DominantFontHeightFunc = letters => letters.Select(l => l.GlyphRectangle.Height).Average()
DominantFontWidthFunc = letters => letters.Select(l => l.BoundingBox.Width).Average(),
DominantFontHeightFunc = letters => letters.Select(l => l.BoundingBox.Height).Average()
});
var blocks = recursiveXYCut.GetBlocks(words);