crop

Crop text out of binary image OpenCV C++

我们两清 提交于 2019-12-23 03:42:10
问题 How can I crop the image so that only the text is included in the image using OpenCV? 回答1: Approach Dilating the image in in the vertical and horizontal direction Finding the bounding rectangle Cropping the image Code # reading the input image in grayscale image image = cv2.imread('image2.png',cv2.IMREAD_GRAYSCALE) image /= 255 if image is None: print 'Can not find/read the image data' # Defining ver and hor kernel N = 5 kernel = np.zeros((N,N), dtype=np.uint8) kernel[2,:] = 1 dilated_image =

Crop an image from gallery in android

戏子无情 提交于 2019-12-23 03:18:10
问题 I want to crop an image in my application when it is selected from gallery.My cropping code work from the simulator but not properly work on phones. I set outputX=400 and outputY =487. In my simulator i get the output bitmap with 400 x 487 resolution,but when i cropped the image from phone gallery i get the output bitmap with 145 x 177 resolution. Why does it happen? My code for cropping is given below Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*");

How to crop(Resize) capture image from iPhone and selecting from photo album?

≯℡__Kan透↙ 提交于 2019-12-23 02:45:46
问题 i have created custom camera overlay view from this blog AROVerlayViewController it's all working properly but i have one problem after capturing image the image is going to be streched while showing in ImageView here as you can see the image is going to be stretched it's not showing the original captured image. and how to add location while capturing image. for image cropping i have used this code from here 回答1: So it is the camera with which you are taking a picture right (even if its a

How to crop image on camera preview “Goggles style” - Android

牧云@^-^@ 提交于 2019-12-23 02:32:44
问题 I'm trying to make a small Android application that reads text from pictures. I've already implemented Tesseract tools for Android and I'm able to recognize text from pictures taken with camera. My current problem is that distance for taking picture is really strict. It's not really user friendly if users has to be at very exact distance from text (s)he's trying to read. I was thinking that best way would do it like in Google Goggles where user is able to crop specific part of image (on

Threshold value when converting image to 1bpp?

纵然是瞬间 提交于 2019-12-23 02:16:21
问题 I don't know how to tag this question, please edit if possible. The job: Create an application which can auto-crop black borders in images in batch runs. Images vary in quality from 100-300dpi, 1bpp-24bpp and a batch can vary from 10 - 10 000 images. The plan: Convert image to 1bpp (bitonal, black/white, if it isn't already) and after "cleaning up" white spots/dirt/noise find where the black ends and the white begins, these are the new coords for the image crop, apply them to a clone of the

Crop centered image inside div

[亡魂溺海] 提交于 2019-12-22 14:52:30
问题 I have a div containing an image (img) element, which extends for 100% width inside it. I would like to specify a maximum height for the div, and hide the parts of the image exceeding this height. But I also want to keep this image centered vertically inside the div to show only its central part. For example, if browser width is 1200px and image aspect ratio is 4:3, image should display (1200x900)px. But if we want to crop height to 300px only and center vertically, image should position at

Crop centered image inside div

旧巷老猫 提交于 2019-12-22 14:52:01
问题 I have a div containing an image (img) element, which extends for 100% width inside it. I would like to specify a maximum height for the div, and hide the parts of the image exceeding this height. But I also want to keep this image centered vertically inside the div to show only its central part. For example, if browser width is 1200px and image aspect ratio is 4:3, image should display (1200x900)px. But if we want to crop height to 300px only and center vertically, image should position at

GWT client side cropping

爱⌒轻易说出口 提交于 2019-12-22 12:56:16
问题 I'm stuck on integrating gwt with JCrop or imgareaselect javascript libraries I have an image, which url is changing each time the client change the file choosen from its filesystem (using an upload widget). I want the user select the area in its image, this way i will be able to have images with aspect ratio respected respect to the client wishes. Problem is i can't succed in making imgareaselect or jcrop called on load event, each time i have null, if i try jquery ("imagepreview") jquery is

How to crop a mp3 in ASP.NET + C#?

五迷三道 提交于 2019-12-22 12:35:19
问题 I am in an ASP.NET project using C#. The users can upload their MP3 (I have no control over the encoding) and specify a sample size and a sample starting point. On save, the system needs to create a sample of this MP3 based on the information provided. So the question is: How can Icrop a mp3 in ASP.NET + C#?? 回答1: While you could possibly use a .NET audio library to do this, I think the easiest way to do this would be to run a command like FFMpeg or MPlayer to do the cropping for you, then

How to crop a mp3 in ASP.NET + C#?

半腔热情 提交于 2019-12-22 12:34:12
问题 I am in an ASP.NET project using C#. The users can upload their MP3 (I have no control over the encoding) and specify a sample size and a sample starting point. On save, the system needs to create a sample of this MP3 based on the information provided. So the question is: How can Icrop a mp3 in ASP.NET + C#?? 回答1: While you could possibly use a .NET audio library to do this, I think the easiest way to do this would be to run a command like FFMpeg or MPlayer to do the cropping for you, then