image-manipulation

Extracting Shapes that meet a certain criteria from an Image

梦想的初衷 提交于 2019-12-12 18:38:37
问题 Let's say I have an image that I want to extract certain shapes from. This image has a plethora of shapes, but I'm only concerned about the shapes that are filled with diagonal lines. Such an image could look like this: Since I only care about shapes that have diagonal lines in them, I'm trying to use this image to generate one that looks like this: Currently, I'm attempting to do this with convolution. I start by convolving the image with this matrix: ] Which produces an image that looks

PHP or Python for Image Processing?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 17:59:35
问题 I am writing an application for image processing. I am just wondering which programming language would be the best fit. Python or PHP. This process is system based not web based so I am just thinking if Python could be of more help. Let me know your thoughts! 回答1: Python has stuff like SciPy and PIL so probably Python. Here is how people use it: Peak detection in a 2D array How can I improve my paw detection? 回答2: One cannot suggest much without knowing the kind of image processing you have

How to scale an image (in data URI format) in JavaScript (real scaling, not using styling)

坚强是说给别人听的谎言 提交于 2019-12-12 07:09:35
问题 We are capturing a visible tab in a Chrome browser (by using the extensions API chrome.tabs.captureVisibleTab) and receiving a snapshot in the data URI scheme (Base64 encoded string). Is there a JavaScript library that can be used to scale down an image to a certain size? Currently we are styling it via CSS, but have to pay performance penalties as pictures are mostly 100 times bigger than required. Additional concern is also the load on the localStorage we use to save our snapshots. Does

Creating a sized image out of a string in Java

旧时模样 提交于 2019-12-12 05:31:33
问题 I am making a 2d engine using Java based on entities. The physics and sprites are done, but I still need to be able to draw text with the BaseText class. For experimental purposes I am using the following code in the Renderer class (that handles drawing all the sprites and such): BufferGraphics.drawString(((BaseText) Entity).getText(), (int) -(Origin.getX() * PositionTransform), (int) -Origin.getY()); I would like to, however, be able to either move this code into the setText(final String

How to use image manipulation library Glide with plain PHP

耗尽温柔 提交于 2019-12-12 03:25:21
问题 I'm trying to use PHP Glide image manipulation library for one of my projects. I've followed their docs given at here - http://glide.thephpleague.com/1.0/simple-example/ . I've created a "routes.php". Here is my code. <?php require 'vendor/autoload.php'; // Setup Glide server $server = League\Glide\ServerFactory::create([ 'source' => 'img/users/source', 'cache' => 'img/users/cache', ]); // echo '<pre>'; // print_r($server); // echo '</pre>'; // You could manually pass in the image path and

Black color of ImageMagick vignette?

☆樱花仙子☆ 提交于 2019-12-12 03:15:12
问题 PHP Imagemagick API has a vignette function: http://www.php.net/manual/en/imagick.vignetteimage.php Great, but how do I get it with black color? 回答1: Vignette's will default to the given image's background color. Altering this color is as simple as setting the image's background color before transforming the image with the Vignette effect. <?php $img = new Imagick("source.png"); $img->setImageBackgroundColor("black"); $img->vignetteImage(-5.0,15.0,15,15); $img->writeImage("source_vignette.png

Can a client Flash (swf file) do the following?

为君一笑 提交于 2019-12-11 17:24:43
问题 I need to make a simple flash program (exported as a swf to be displayed in a webbrowser) that allows a user to manipulate an existing image but then SAVE this manipulated image to a webserver. Can the client side flash program generate the new image OR does it need to send back all the changes to the web server, which will then generate the new image (based on those changes, via a POST) on the server side? cheers :) 回答1: You can do this just fine, Flash has all the bitmap manipulation

Image resize script

独自空忆成欢 提交于 2019-12-11 16:15:54
问题 I'm searching a javascript that can resize images similar to script thats available as a plugin in vBulletin CMS: I want the script to be used in blogger blog so that all images i upload into a post are resized to a smaller res and on clicking the image should be displayed in original dimensions Something of the sort getelementbyID("img") . are there any script providing this feature? Pls help me out Thanks in advance. 回答1: Something like a lightbox, perhaps? I know the specific interaction

Image Manipulation in Android app

微笑、不失礼 提交于 2019-12-11 15:04:54
问题 Can anyone help me on this one? I want to do image manipulation in my Android app like Brightness and Contrast. Any ideas ? 回答1: I previously posted an example of how to greyscale an image in android. This code could be used as a starting point for basic image manipulation. I also suggest you check out the ColorMatrix class 来源: https://stackoverflow.com/questions/5962032/image-manipulation-in-android-app