crop

Cannot open the connection in raster R

你。 提交于 2019-12-24 07:18:18
问题 I used these functions several times, and they were working perfect, nothing wrong with my input data!! m<-raster::intersect(raster,shapefile) or n<-crop(raster, extent(shapefile)) I have to do this operation for a large set of data. Therefore, I tried to increase the speed of R by using multicore . I did use multicore.tabulate.intersect function from here However, nothing works for me. Then, whenever I run intersect or crop function I got this error: m<-raster::intersect(raster,shapefile)

Image Cropping using Predefined ROI Matlab

与世无争的帅哥 提交于 2019-12-24 07:14:52
问题 Basically what I'm trying to do is using predefined ROI's to crop and image into multiple new images. Longer is that I have a map of brain, with sections of it defined. using that I define many ROI's from it in MATLAB using imfreehand or roipoly. From there I have stained slides of these sections. I want to use the ROI's that I defined from the map to crop the image of the real brain into many new images. Just having trouble finding something that uses the ROI's as the cropping area and not

Google Photos App style Image Cropping, Straightening and panning

隐身守侯 提交于 2019-12-24 03:28:49
问题 I am looking for Google Photos app style image manipulation. I am kind of new to image processing. Any leads on how to make the cropping rectangle with the image the same size as cropping rectangle, rotation (which rotates both the image and cropping rectangle), image straightening (including how to get that angle slider kind of UI) will be great. If there are some libraries that has these features, that will also work. 回答1: Square has a library for loading and playing with images. Here are

Caffe | data augmentation by random cropping

╄→гoц情女王★ 提交于 2019-12-24 00:52:58
问题 I am trying to train my own network on Caffe, similar to Imagenet model. But I am confused with the crop layer. Till the point I understand about crop layer in Imagenet model, during training it will take random 227x227 image crops and train the network. But during testing it will take the center 227x227 image crop, does not we loose the information from image while we crop the center 227x27 image from 256x256 image? And second question, how can we define the number of crops to be taken

How can I crop/scale user images so I can display fixed sized thumbnails without skewing and stretching?

余生颓废 提交于 2019-12-24 00:35:05
问题 I'm working on allowing users to upload profile pictures for my site. The classic example of what I'm trying to avoid is plentyoffish.com where each users image is skewed and looks very ugly: So, how can I progmatically crop/create standard sized versions of an image without the skewing demonstrated above? 回答1: Well, you must have a maximum height and width, lets assume the image size you have available is square, say 100x100. When a user uploads an image get the dimensions of it, then work

Cropping Pictures in Android by keeping Aspect Ratio

百般思念 提交于 2019-12-23 18:05:56
问题 I use this code to start the crop activity and i get the cropped picture as data in onActivityResult back. So this works fine. Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); List<ResolveInfo> list = getPackageManager().queryIntentActivities( intent, 0); int size = list.size(); if (size == 0) { Toast.makeText(this, "Can not find image crop app", Toast.LENGTH_SHORT).show(); return; } else { intent.setData(mImageCaptureUri); intent.putExtra("outputX",

Android ImageView centerCrop not working. Skewing instead of scaling

百般思念 提交于 2019-12-23 08:39:47
问题 I'm currently working on a Navigation Drawer where I want the user photo to be scaled, cropped, tinted, then used as the header image behind a circular crop of there picture. I can't even post images because this account is too low rep...damn me and using my old student account for most of my questions... Despite my ImageView being defined like this <ImageView android:tint="@color/clyp_copy" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable

Feature selection using python

给你一囗甜甜゛ 提交于 2019-12-23 05:22:40
问题 It's a letter recognition task and there are 284 images, and 19 classes. I want to apply naive bayesian. First I have to convert each image to feature vector and for reducing extra info I should use some feature selection code like cropping images to remove extra black borders. But I'm not much experienced in python. How can I crop black spaces in images in order to decrease the size of csv files? ( because the columns are more than expected!) And also how can I resize images to be the same

PHP Image cropping to square

你离开我真会死。 提交于 2019-12-23 05:20:34
问题 I was using the following PHP script to create square thumbnails which I got here http://www.abeautifulsite.net/blog/2009/08/cropping-an-image-to-make-square-thumbnails-in-php/ I was able to integrate this into my image upload script, which uploads full sized image and after that takes the uploaded image and creates a thumbnail from that. The problem is the author of the script said, it will crop landscape and portrait images without problem. It crops landscape images perfectly, but as it

Crop text out of binary image OpenCV C++

白昼怎懂夜的黑 提交于 2019-12-23 03:42:11
问题 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 =