示例#1
0
        private void LoadPhoto(PxMetaImage metaImage)
        {
            using (NSAutoreleasePool autoreleasePool = new NSAutoreleasePool())
            {
                UIImage image           = metaImage.Image;
                CGSize  maxSuportedSize = PxSDK.SupportedImageSize(image.Size);
                if (image.Size != maxSuportedSize)
                {
                    // Resize input image if its size is greater than the supported maximum
                    metaImage.Image = ImageUtils.ScaleImage(image, maxSuportedSize);
                }

                this.inImage            = metaImage;
                this.outImage           = null;
                this.ImageView.Image    = metaImage.Image;
                this.SaveButton.Enabled = false;
            }
        }
示例#2
0
        private bool ProcessCrop(PxMetaImage source, out PxRectangle pts)
        {
            PxDocCorners docCorners;
            bool         result = PxSDK.DetectDocumentCorners(source, out docCorners);

            pts.leftTop     = docCorners.ptUL;
            pts.rightTop    = docCorners.ptUR;
            pts.leftBotton  = docCorners.ptBL;
            pts.rightBotton = docCorners.ptBR;

            bool isSmartCropMode = false;

            if (result)
            {
                isSmartCropMode = docCorners.isSmartCropMode;
            }

            return(isSmartCropMode);
        }
示例#3
0
 private static PxMetaImage DoColor(PxMetaImage source)
 {
     return(PxSDK.ImageColorBinarization(source));
 }
示例#4
0
 private static PxMetaImage DoGray(PxMetaImage source)
 {
     return(PxSDK.ImageGrayBinarization(source));
 }
示例#5
0
 private static PxMetaImage DoBW(PxMetaImage source)
 {
     return(PxSDK.ImageBWBinarization(source));
 }
示例#6
0
 private static PxMetaImage DoOriginal(PxMetaImage source)
 {
     return(PxSDK.ImageOriginal(source));
 }
示例#7
0
 private PxMetaImage ProcessPerspective(PxMetaImage source)
 {
     // Get image without perspective distortion.
     return(PxSDK.CorrectDocument(source, ref points));
 }