crop

MATLAB Auto Crop

丶灬走出姿态 提交于 2019-12-14 03:44:04
问题 I am trying to automatically crop the image below to a bounding box. The background will always be the same colour. I have tried the answers at Find the edges of image and crop it in MATLAB and various applications and examples on Mathworks' file exchange but I get stuck at getting a proper boundingbox. I was thinking to convert the image to black and white, converting it to binary and removing everything that's closer to white than black, but I'm not sure how to go about it. 回答1: Following

Darken parts of a free-hand cropped image in android

假如想象 提交于 2019-12-13 23:05:58
问题 I want to add a free hand crop functionality. Till now I can open the picture and draw a path around the part of the image that I want to crop thanks to this code: https://stackoverflow.com/a/18459072/2361533 But before opening the cropped image in another activity, I want to darken the outside part of the crop path, to show the user how the cropped image will be. In case he does not like the result, he could reset the image. It would be something like the image here: Android: Free Croping of

How to move and crop image from masked image?

青春壹個敷衍的年華 提交于 2019-12-13 22:01:41
问题 I have masked image successfully with the help of following link: How to Mask an UIImageView In above link there are two images named image.png and mask.png , After masking the image i want to crop the result image. My concern is that I want to crop the image named image.png but mask.png should be stay still as it is. I am using KICropImageView https://github.com/zhangzhixun/CropImageDemo for cropping the Image. But when I scroll the image my whole result image is scrolling but I just want to

Pdf real cropping

送分小仙女□ 提交于 2019-12-13 21:07:55
问题 I need to crop a pdf document using the linux shell and then extract the text just in that cropped pdf. My idea was to crop a pdf using pdfcrop linux tool and then use a txt2pdf text extractor tool to extract the text just in the cropped area, but i've realized that i'm thinking on images, and when i try to do this the result is the same than doing it over the original, not cropped, pdf. I guess it's a layer problem. As the pdf format works with layers, if i don't "crop" all the layers, the

OpenCV Crop Image using four points

我的梦境 提交于 2019-12-13 18:06:24
问题 I am trying to crop an image then be able to display the image. I have four points in two arrays and it would make a rectangle shape. I have a code that i think would do the job but it is giving an error. Here is the code i hope you can help me out. I am working with android and only with Java. int startX =locListX.get(0); int startY =locListY.get(0); Collections.sort(locListX); Collections.sort(locListY); int width=locListX.get(3)-locListX.get(0); int height=locListY.get(3)-locListY.get(0);

Xaml, wpf image position and crop issue

无人久伴 提交于 2019-12-13 16:36:01
问题 I have images of 600px width and 600px height. we have three sizes of circles. all have the center in the middle. Some have reflection as shadow beneath it. I would like to crop the image for display purposes. So the largest circle as shown above has a diameter of about 500 pixels, but the medium and small ones have less. I know in the code which size I have of object type Product . Because of the size differences I have to place them differently and used three placeholder images for it, like

Is there a way to use JavaScript to crop & resize an image before displaying it?

半城伤御伤魂 提交于 2019-12-13 15:41:19
问题 I have a bunch of images held on a third party server that I want to load and display as thumbnails on a webpage... Can I use JavaScript to load each image, crop and resize them to all be the same size, then display them in a grid on the page? Ideally, I'd like to be able to do it client side. I don't really want to pre-load and process them on the server as I do not want to increase bandwidth usage.. 回答1: You can put each image inside a block container with fixed dimensions and overflow:

Crop raster with polygon in R: Error extent does not overlap

谁说我不能喝 提交于 2019-12-13 15:26:58
问题 I want to crop a raster stack using a polygon shapefile i made in ArcGIS, however I get error that extent does not overlap. First I create the raster stack: test1 < stack("C:/mydir/test1.tif") define projection myCRS <- test1@crs then read shapefile myExtent <- readShapePoly("C:/mydir/loc1.shp", verbose=TRUE, proj4string=myCRS) Crop myCrop <- crop(test1, myExtent) Error in .local(x, y, ...) : extents do not overlap I have searched for a solution, but i only find that projection can be the

StartActivityForResult not working in AsyncTask

放肆的年华 提交于 2019-12-13 05:10:05
问题 I am trying to use Biokys crop image library within my AsyncTask class and for some reason when trying to start the crop image class for a result, I get an error. I have looked up what would be causing this and people have suggested that you should use: YourClassName.this.startActivityForResult(Intent, RESULT_CODE); But this isn't working for me. If someone would be able to explain why this is happening, would be much appreciated. Class: private void runCropImage() { Intent intent = new

Android CROP error with Samsung devices

假如想象 提交于 2019-12-13 04:22:53
问题 I´m developing a app and I take photo and crop... This is all my code: // keep track of camera capture intent final int CAMERA_CAPTURE = 1; // keep track of cropping intent final int PIC_CROP = 2; // captured picture uri private Uri picUri; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.shadows_photo); // retrieve a reference to the UI button Button captureBtn = (Button)