imaging

Find an image in an image C#

我是研究僧i 提交于 2019-12-12 19:17:16
问题 I have a scan of a document (a form actually) filled with some handwritten infos. I have a bitmap of the form empty. how can i "cancel" the printed form to extract the handwritting only. I use C#... Thanks Jonathan 回答1: What you want to do is subtract the empty form image from the image of the form with handwriting in it. This will give you a reasonable image of the handwriting alone. Please note that this will not register the images. Registration will line them up so that they are at

canvas corrupts rgb when alpha =0

痞子三分冷 提交于 2019-12-11 11:42:22
问题 I'm using a HTML canvas to project an image. When i try to manipulate the image data's Alpha channel I'm seeing that anytime it is zeroed, the other values in the pixel get changed. Even when set to a low number they seem to change. Doing this from the console canvas=document.getElementById('canvasid') ctx=canvas.getContext('2d') mydata=ctx.getImageData(20,20,20,20) for (var i=0;i<1600;i+=4){mydata.data[i+3]=0} ctx.putImageData(mydata,20,20) mydata=ctx.getImageData(20,20,20,20) for (var i=0;i

setting up and choosing which gallery to flip through its images

梦想的初衷 提交于 2019-12-11 10:15:44
问题 i was trying to choose with keyboard input 1 and 2 to choose the gallery 1 or 2 which is a list of images to be loaded on the screen it worked fine with one gallery with this code import pygame WIDTH = 1366 HEIGHT = 768 pygame.init() screen = pygame.display.set_mode((WIDTH, HEIGHT), pygame.NOFRAME) clock = pygame.time.Clock() # Needed to limit the frame rate. pygame.display.set_caption('Katso') # Put the images into a list. images = [ pygame.image.load('assets/download.png').convert(), pygame

How to use ControlPaint.DrawGrid To Draw To a PictureBox

浪尽此生 提交于 2019-12-11 06:46:55
问题 I am attempting to draw a graph paper like grid to a picture box and then printing it out. I figured my best route of attack for this would be the DrawGrid function. I got some stuff down and then it fell apart after I got to the control paint part. How can I convert a Painting to drawing. Please explain, as of now I am fairly confused. Rectangle rect = new Rectangle(); rect.Location = new System.Drawing.Point(0,0); rect.Height = (int)numericUpDown1.Value; rect.Width = (int)numericUpDown2

How to overlay segmented image on top of main image in python

只愿长相守 提交于 2019-12-11 05:13:23
问题 I have an image in RGB and another segmented image in which the pixels have 3 values(segmented image). I want to overlay the segmented image on top of the main image as the segmented areas make contours over the main image such as image below. Here the value of the segmented image pixels are 0, 1 and 2. The red contour shows the contour of pixels with value1 , the yellow contour shows the contour of pixels with 2 value and the background pixel value is 0. the image is from the paper "Dilated

Is there any good python library for generating and rendering text in image format?

烂漫一生 提交于 2019-12-11 05:12:26
问题 I'm developing a CMS like application where the user should be able to create the menu the way he wants. Ideally, each menu object wouldn't be a text with a background but rather an image of the text. I envision this in either of these 2 ways: a) By rendering a font in a/several image file/s with every letter and a script that given a word would give me either the sequence of images to string together or a single image file with the combination of all letters. I understand this could be done

Translating a C++ (dealing with corona) function into C#

烂漫一生 提交于 2019-12-11 04:05:22
问题 i had a C++ .exe i was using as a standalone image cleaner. But i now want to use its fonction into my own c# app, so i started to translate it. But i REALLY TOTALLY know nothing about C++ and its logic. So i come here for some help. First, does anyone know any equivalent for this function? Corona "getPixels()" (yes with an "s" because i know c# have a built-in getPixel) : here is the function explaination from corona doc : getPixels() Corona dll it is used in the lines i am looking to

How apply Color Lut over bitmap image in c#

巧了我就是萌 提交于 2019-12-11 01:47:52
问题 I am opening different types of images like (8 and 16 bit) and they are (Monocrome, RGB ,palette color). I have raw pixel data of these images. I create bitmap like this for 8 bit images. //for monocrome images i am passing PixelFormat.Format8bppIndexed. //for RGB images i am passing PixelFormat.Format24bppRgb PixelFormat format = PixelFormat.Format8bppIndexed; Bitmap bmp = new Bitmap(Img_Width, Img_Height,format); Rectangle rect = new Rectangle(0, 0, Img_Width, Img_Height); //locking the

Write text to image with indexed pixel format

拈花ヽ惹草 提交于 2019-12-11 00:56:29
问题 I have monochrome TIFF files (1 bpp) that I would like to write text to. When I load them into System.Drawing.Image, and try to instantiate a Graphics object from that image, I receive the error, "A Graphics object cannot be created from an image that has an indexed pixel format." I can convert the images to a non-indexed format, such as JPEG, but then the resulting image size is very large. I would like to accomplish this while keeping the image size down. How can I write text onto these

Does there exist a digital image steganography algorithm which would be resistant to image manipulation?

空扰寡人 提交于 2019-12-10 17:56:25
问题 I'm wondering - is there a steganography solution for digital images which is resistant to image manipulations? With "manipulations" I mean the most standard operations - recompressing JPEGs (or even changing file formats entirely), cropping and scaling. The application of this method would naturally be for image copyright protection. I fully understand that the more image is manipulated the less are the chances that the steganographic watermark is intact, but at least some degree of