I am doing a motion detector program but I have an error in the following part of the code:
rang = cv2.inRange(flow,20,255)
Error:
TypeError: <unknown> is not a numpy array
Annex code:
import cv2
import numpy as np
cap = cv2...
I am developing software to calculate NDVI.
What is NDVI? is a mathematical calculation with which you can determine the level of vegetation stress
NDVI = NIR-RED / NIR + RED
This result varies from -1 to 1
I'm using OpenCV as a library for arti...
One question; Why do I do this in interactive mode from python and from "spyder / ninja" does not work?
Python
»> from numpy import *
»> a = array([10,20,30,40])
»> append(a,50)
array([10, 20, 30, 40, 50])
»>
Spy...
How can I calculate the time difference between a client's actions?
I want to calculate all the elapsed time of the users until it passes to the next user. example .... from user 1 to two it was 2 days 4 hours, 5 seconds.
This is the dataf...
I have the following exercise:
a. Write a function that implements the gamma transformation of a grayscale image. The
function must receive as input parameters: a grayscale image (uint8) and the parameter
gamma. The output parameter...
I'm creating a numpy array called a table, in the fifth column I want to save a list of numbers that I have in a .txt file
I do it with the following code:
tabla[:, 4] = np.fromfile('/home/lucia/Documentos/Base de datos de imagenes/TID2013/...
I am trying to obtain the determinant of a matrix with the help of numpy.linalg.det (matrix) this is the code:
from sympy import *
#from numpy import *
import numpy as np
from matplotlib import *
from py_expression_eval import *
import matplot...
I am trying to multiply a matrix using numpy by itself N times, this is my current code
import numpy as np
fil1=3
col1=2
mat1 = random.random((fil1,col1))
mat3 = np.zeros((fil1,col1))
iter = 2
print('Matriz A:\n',mat1)
for r in range(0,fil1)...
I have two arrays with values x and y, "x" (value of random variable) are input values, and "y" are values calculated as a function of x (normal probability density function for x). How can I calculate the integral of "y" for a range of values i...
I used this code to extract the data from a CSV file, filter it and even organize it per minute, but I would like your help to create a cycle that allows me to update the information per minute, determining the maximum and the minimum value.
i...