File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
android/src/main/java/com/documentscanner Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -206,13 +206,13 @@ private ScannedDocument detectDocument(Mat inputRgba) {
206206 sd .originalSize = inputRgba .size ();
207207 Quadrilateral quad = getQuadrilateral (contours , sd .originalSize );
208208
209+ double ratio = sd .originalSize .height / 500 ;
210+ sd .heightWithRatio = Double .valueOf (sd .originalSize .width / ratio ).intValue ();
211+ sd .widthWithRatio = Double .valueOf (sd .originalSize .height / ratio ).intValue ();
212+
209213 Mat doc ;
210214 if (quad != null ) {
211215
212- double ratio = sd .originalSize .height / 500 ;
213- sd .heightWithRatio = Double .valueOf (sd .originalSize .width / ratio ).intValue ();
214- sd .widthWithRatio = Double .valueOf (sd .originalSize .height / ratio ).intValue ();
215-
216216 sd .originalPoints = new Point [4 ];
217217
218218
You can’t perform that action at this time.
0 commit comments