image-processing

Canon SDK example for image processing

六月ゝ 毕业季﹏ 提交于 2021-02-08 03:48:04
问题 I would like to use the canon EDSDK in a c# or VB.NET program, to view cr2 files. I have found sample code on how to control the camera - example: https://github.com/esskar/Canon.Eos.Framework but nothing about opening the files, extracting the image data and displaying it - or saving the thumbs or full sized image as a jpg... Could someone direct me to some such examples ? Thank you. Note - I have EDSDK 2.12, i hope older versions could also help. Edit: Thank you for the suggestion, it

Is it possible to check orientation of an image before passing it through pytesseract ocr module

别等时光非礼了梦想. 提交于 2021-02-08 03:45:58
问题 For my current ocr project I tried using tesserect using the the python cover pytesseract for converting images into text files. Up till now I was only passing well straight oriented images into my module at it was able to properly figure out text in that image. But now as I am passing rotated images it is not able recognize even a single word. So to get good result I need to pass images only with proper orientation. Now I want to know that is there any method to figure out the orientation of

Quantify how much a slide has been filled with handwriting

点点圈 提交于 2021-02-08 03:33:25
问题 I have a video of a slideshow, where the presenter handwrites notes onto the slide: I would like to create a program that detects if a slide is being filled (by handwritten notes for example) or if it is a new slide. One method I was thinking of is OCR of the text, but this is not suitable since here the only text that changes are either handwritten or math. What I have done so far: I go through the video and compare always the previous frame and the current frame. I extract the bounding box

Converting .mat file extension image to .jpg via python

自古美人都是妖i 提交于 2021-02-08 03:31:32
问题 I'm currently trying to converting the images from a .mat file to .jpg file downloaded from this site- BrainTumorDataset. All the files contained in the directory are .mat files, now I want to convert all the files in .jpg format via python for making a project(Brain Tumor Classification using Deep Neural Net) via CNN. I searched in google but then I didn't get anything from there, only some topics on how to load .mat file in python but that also didn't help me. I found an answer in

Change entire images slices of NIFTI in Python 3.7

喜夏-厌秋 提交于 2021-02-07 23:01:51
问题 I'm actually work on MRI images using Python. The image format is the NIFTI format I get how to visualise slices on x, y or z axe, but now, I want tu use Sobel filtering on each of them and create a new NIFTI image with those slices. For that: I load the main .nii.gz image (img = nib.load(im_path)) I load again the main .nii.gz image with a new name "img_sobel" (img_sobel = nib.load(im_path)) Create a loop for each slice Sobel filtering the slice Replace this slice on the corresponding slice

ImageMagick: Promote grays to CMYK black?

核能气质少年 提交于 2021-02-07 21:55:01
问题 Is there a way to move all gray colors of a CMYK image (e.g. a CMYK .tiff) into the black (K) plate with ImageMagick? (In Adobe Acrobat Pro, this functionality is labeled: "Promote grays to CMYK black") Here's an image to experiment with: You can view an example of this process on Wikipedia. 回答1: Also not a full answer as such, but hopefully useful towards producing one - by Kurt, myself or others. I looked at the Photoshop method of GCR and am adding the characteristic curves that Adobe seem

How to remove watermark from text document using openCV python?

荒凉一梦 提交于 2021-02-07 21:14:30
问题 I am new to OpenCV, I need help removing the watermark from this image, I tried using inpaint but I want a more automated way of feature mapping and inpainting, pls help me with it. 回答1: If all your images are like this and have a watermark as shown in the question having a light gray watermark then a simple thresholding operation will work. import cv2 img = cv2.imread('watermark.jpg') _, thresh = cv2.threshold(img, 150, 255, cv2.THRESH_BINARY) cv2.imshow('Result', thresh) cv2.waitKey(0) cv2

How to remove watermark from text document using openCV python?

女生的网名这么多〃 提交于 2021-02-07 21:06:41
问题 I am new to OpenCV, I need help removing the watermark from this image, I tried using inpaint but I want a more automated way of feature mapping and inpainting, pls help me with it. 回答1: If all your images are like this and have a watermark as shown in the question having a light gray watermark then a simple thresholding operation will work. import cv2 img = cv2.imread('watermark.jpg') _, thresh = cv2.threshold(img, 150, 255, cv2.THRESH_BINARY) cv2.imshow('Result', thresh) cv2.waitKey(0) cv2

How to remove watermark from text document using openCV python?

两盒软妹~` 提交于 2021-02-07 21:05:23
问题 I am new to OpenCV, I need help removing the watermark from this image, I tried using inpaint but I want a more automated way of feature mapping and inpainting, pls help me with it. 回答1: If all your images are like this and have a watermark as shown in the question having a light gray watermark then a simple thresholding operation will work. import cv2 img = cv2.imread('watermark.jpg') _, thresh = cv2.threshold(img, 150, 255, cv2.THRESH_BINARY) cv2.imshow('Result', thresh) cv2.waitKey(0) cv2

How do I crop an image on a white background with python?

倖福魔咒の 提交于 2021-02-07 19:59:23
问题 I am scanning old photos, so I have the image and a white background from the scanner. My aim is to take the picture, removing the white background. How can I do that ? An example picture is the following: My simple approach: import os import time from PIL import Image from collections import Counter import numpy as np def get_cropped_image(image, crop_folder, threshold): image_name = image.split("\\")[-1] im = Image.open(image) pixels = im.load() width, height = im.size rows = [] for h_index