Questions tagged [opencv]

OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.

Filter by
Sorted by
Tagged with
3
votes
1answer
109 views

How to change a numpy array's dimensions [closed]

I'm using GDAL Python API to read a raster into a NumPy array, it will return a array's shape like [bands, rows, cols], if we want to use OpencCV to deal with this array, it will cause some problem, ...
1
vote
2answers
56 views

How to save raster with projection into Python

I applied a raster processing that is already in a known coordinate system with this code, import cv2 import numpy as np from matplotlib import pyplot as src img = cv2.imread(r'E:\2_PROJETS_DISK_E\...
0
votes
0answers
57 views

How to dynamically provide input for contour thresholding in openCV

I am the following codes for getting the contours in openCV # load the image, convert it to grayscale, and blur it slightly image = cv2.imread(args["image"]) gray = cv2.cvtColor(image, cv2....
4
votes
1answer
61 views

Adding up several rasters to show the change

I want to add several images such that their change is shown in different colors. Such as the following in which I simply added two images in their grayscale. But I would like to have a colored ...
0
votes
1answer
48 views

How do I contribute to opencv-python? [closed]

I have an implementation of a computer vision algorithm in python. I would like to contribute this to opencv-python. This is my first time contributing to FOSS. How should I go about it?
2
votes
1answer
92 views

Is there a GDAL function similar to OpenCV's WarpPerspective?

I't trying to mosaic a GeoTiff raster against another. Initially, they were both georeferenced in WGS-84 CRS. Using OpenCV, I calculated a homography transformation (a 3x3 projection matrix), that ...
1
vote
1answer
472 views

How do I convert Digital Number (DN) to reflectance in order to analyze NDVI

I'm working with a mapir nir + red camera meaning that its blue band captures nir light and its red captures red normally. I understand that NDVI is calculated using reflectance values. My question ...
0
votes
1answer
108 views

How do I visualize NDVI values?

Currently, I have the NDVI values, and I transformed it from [-1, 1] to [0, 255]. Now my question is how do I visualize either of these value? My first thought is to make a color map similar to the ...
0
votes
1answer
1k views

Importing cv2 on Python 2.7 gives error [closed]

When importing cv2 on Python 2.7 I got this error: Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import cv2 ImportError: DLL load failed: The specified ...
1
vote
1answer
277 views

Seeking Open Source implementation of Majority Filter?

I am performing postprocessing on Landsat GeoTIFF images and want to use the Majority Filter as mentioned in the book on Image Analysis, Classification and Change Detection in Remote Sensing and ...
1
vote
0answers
327 views

Raster alignment

I have a problem with raster aligning. Given: Two rasters that need to be aligned. Rasters a little bit shifted, scaled and rotated. Two arrays of matched keypoints. Transformation is wrong, so ...
0
votes
2answers
3k views

How to save numpy array as single band image?

I'm working on MODIS NDVI composite data (single band). I converted the image to a numpy array and performed filtering operations. When i'm saving the new numpy array as an image I get a 3 band image ...
1
vote
0answers
511 views

How to loop the kernel for covering all pixels from a raster in 5x5 convolution window by using OpenCV? [closed]

Here, I have python code which is helping me in selecting 5 by 5 window from upper left corner of a raster (.tif). I want a process to automate through entire image in 5 by 5 convolution window. ...
2
votes
0answers
295 views

reading 13 bands (Sentinel 2A) .tif image in cv::Mat (opencv C++)

I want to read 13 bands of a .tif image in separate cv::Mat objects for processing. I have tried reading it with opencv imread() function but it fails to load it. Also, I have used libtiff but I am ...
6
votes
2answers
3k views

Detecting overlapping blobs in image?

I have read the following two posts related to my question; however, my problem is slightly different and I'm having a hard time solving it. Finding if two polygons Intersect in python? Getting ...
0
votes
1answer
1k views

GDAL, python: How to create a GDAL dataset object from a numpy array

I am working on a program that uses both OpenCV and GDAL to perform different tasks. OpenCV stores its images as numpy arrays. I would like to be able to go directly from this numpy array to a dataset ...