Relative Content

Tag Archive for pythonopencv

Problems with OpenCV Draw Axis function

I am detecting the charuco boards using the OpenCV Contrib 4.10.0 version. Once I have detected and estimated its pose, I am trying to plot the axis; however, I can see different axis if I change their lengths even if everything remains the same. I am providing a sample image, camera params and code to reproduce. Take a look a the attached images as well.

I’m trying to solve a captha image I downloaded by editing a code on github

import pandas as pd import numpy as np import cv2 import glob import imutils from imutils import paths import os import os.path import sys captcha_image = (“C:/Users/xxxxx/Documents/PythonProgramming/IG/nothing.jpg”) # Load the image and convert it to grayscale image = cv2.imread(captcha_image) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # grab the base filename as the text filename = os.path.basename(captcha_image) captcha_text […]

removal of lines in an image using Python

I am trying to use Python and cv2, numpy, skimage, etc to remove a ‘shadow line’ from a black and white image if one exists in the image. Essentially my image can have 1 or 2 curved lines like the examples below. But each of those lines has a shadow line with 1-5 pixels away that needs to be removed. How can I do this in Python?

Use OpenCV to stitch 2d histograms – Merge cv2.detail.MatchesInfo

I am attempting to stitch multiple 2d histograms (2d data arrays) together for which the horizontal and vertical axes of the histograms are spatial coordinates, but the origin for the different histograms may vary. This task therefore requires affine transformations after identifying matching features, for which a slightly modified OpenCV stitching pipeline (https://github.com/opencv/opencv/blob/4.x/samples/python/stitching_detailed.py) is used.