Charltsing.Liu
Charltsing.Liu

https://github.com/d2phap/ImageGlass/blob/develop/Source/Components/ImageGlass.Base/BHelper/Extensions/ID2D1Bitmap1Extensions.cs public static Color GetPixelColor(this IComObject? srcBitmap1, IComObject? dc, int x, int y) { if (srcBitmap1 == null || dc == null) return Color.Transparent; var bmpProps = new D2D1_BITMAP_PROPERTIES1() {...
thank you for your help. i think it is suitable for one subject in image . (sweeping in from the corner of the bounding box along 45 degree lines) but...
Another approach is to use canny edge detection,then sort to find the longest four edges, If the background is not pure, this method will recognize incorrect edge lines. [Imaging-Library](https://github.com/enginkirmaci/Imaging-Library)
thanks for your help there are some sample images [img.zip](https://github.com/DanBloomberg/leptonica/files/13258881/img.zip)
好奇地问一下,为什么你要转成tiff? 从图像存储的角度而言,png以及完全够用了,毕竟你这个文件不需要什么真彩。 如果是打算做电子存档,GB/T 18894-2016已经允许使用PNG格式了。 8.3.3 以文本、位图文件形成的文书、科技、专业类电子文件应按以下要求归档: a)电子公文正本、定稿、公文处理单应以版式文件格式,其他电子文件、电子文件组件可以版式文件、RTF、WPS、DOCX、JPG、TIF、PNG等通用格式归档;
现在国内的在线OCR比Abbyy准多了,后者也就对付一下常用的印刷体。在线OCR手写体都能做到极高的准确率。 也许你应该换一个别的pdf ocr软件,或者自己结合在线OCR接口写一个。 至于图像大小,像这种黑白图,JBIG2才是最小的。如果是16色灰度图,png也支持4bit索引,效果很好。至于256色灰度,那就基本什么格式都可以了。tif的1bit编码体积不是很理想,图像格式也太乱了些,所以至今为止你看浏览器都不支持这个格式,这都是有原因的。
C#可以支持原生库的Anycpu,只要给原生库的API做个包装,类似这样 代码: `[SuppressUnmanagedCodeSecurity] //调用非托管代码时执行的堆栈遍视在运行时被省略,从而大幅节省性能。 internal sealed class JBIG2EncNativeMethods { [DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")] private static extern int JBIG2EncodeVerNum_x86(); [DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention =...
C#可以支持原生库的Anycpu,只要给原生库的API做个包装,类似这样 `[SuppressUnmanagedCodeSecurity] //调用非托管代码时执行的堆栈遍视在运行时被省略,从而大幅节省性能。 internal sealed class JBIG2EncNativeMethods { //https://hub.njuu.cf/AndreyAkinshin/InteropDotNet 通过LoadLibrary和GetProcAddress实现。 [DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")] private static extern int JBIG2EncodeVerNum_x86(); [DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention...
> 要是合成到一起,就有损了。 > > 不过,从使用者的便利度来看,倒是可以考虑的。 按道理来说,png是无损的,把img和mask叠加到一起,根据mask做成透明图,我觉得也不算有损。 导出个黑色的mask也没什么用处。