image-manipulation

How to resize the window obtained from cv2.imshow()?

懵懂的女人 提交于 2021-02-20 04:15:26
问题 I started learning OpenCV today and I wrote a short code to upload (I don't know, if it's the right term) a random image: 1 It works fine, and I can open the image, but what I get is a big window and I can't see the full image unless I scroll it: 2 So, I'd like to know a way that I could see the whole image pretty and fine in a shorter window. 回答1: You can resize the image keeping the aspect ratio same and display it. #Display image def display(img, frameName="OpenCV Image"): h, w = img.shape

How to make icon with pink background transparent?

落爺英雄遲暮 提交于 2021-02-19 05:18:29
问题 I'm using Visual Studio icon library (VS2008ImageLibrary), there are some BMP files with a pink background. How can I make the pink background become transparent? What software can I use to do this? Any free one? Thanks 回答1: You can try it online provided you can transform your bmp into a gif first. Or you can grab PAINT.Net (freeware), and apply a transparent background by following this video instructions. 回答2: I used IrfanView's batch conversion tool. It's still some work, because you have

Displaying php generated image on a page

可紊 提交于 2021-02-10 06:00:31
问题 I have a function i use in modifying my images, and i want to display thos images on my page alongside other page content. PHP Image Function : <?php function dynamicImage($nw, $nh, $source, $stype, $dest) { $size = getimagesize($source); $w = $size[0]; $h = $size[1]; switch($stype) { case 'gif': $simg = imagecreatefromgif($source); break; case 'jpg': $simg = imagecreatefromjpeg($source); break; case 'png': $simg = imagecreatefrompng($source); break; } $dimg = imagecreatetruecolor($nw, $nh);

Android stream multiple bitmap tiles to single jpeg file

一世执手 提交于 2021-02-07 09:12:48
问题 I am developing an image manipulation application which has to be able to work on large images e.g. those taken by a camera, the approach I'm taking is to split the source image into multiple suitably sized tiles so that the tiles can be loaded individually into memory as a Bitmap without exceeding the dreaded VM limit, next image manipulation is performed on a tile by tile basis, this is all well and good but until I want to stitch these tiles back to a final jpeg image. I'm looking for a

C#: Drawing a timestamp onto an image

这一生的挚爱 提交于 2021-01-29 03:15:46
问题 I was just browsing some questions when I stumbled upon this one. I am not experienced in System.Drawing, so I'm just wondering, how would you draw a timestamp onto an image? Also, as I'm very interested in System.Drawing, what are the best resources for learning how to use it well, and its application in various situations? Thank you! 回答1: It sounds like it would be as simple as using GDI to DrawText() on a Bitmap object. As long as you make sure the z-order is correct (i.e. at the back) it

How to replace an image in cloudinary and keep the same URL?

≯℡__Kan透↙ 提交于 2021-01-28 02:50:49
问题 I have an image in cloudinary that I would like to replace but keep the original URL. Would it be possible? 回答1: Yes it is possible to update an image and keep the same URL. When you upload the new image you want to make its public_id be the same as the existing image you're trying to replace. Then your Cloudinary account will be updated with the new image overriding the old one. However note that if the original (older) image was already accessed, it might get cached in the CDN. Here is a

c# .NET green screen background remove

限于喜欢 提交于 2020-12-29 07:22:06
问题 I am working on a photo software for desktop PC that works on Windows 8. I would like to be able to remove the green background from the photo by means of chroma keying. I'm a beginner in image manipulation, i found some cool links ( like http://www.quasimondo.com/archives/000615.php ), but I can't transale it in c# code. I'm using a webcam (with aforge.net) to see a preview and take a picture. I tried color filters but the green background isn't really uniform, so this doesn't work. How to