Ask Your Question

papabiceps's profile - activity

2020-10-19 07:08:35 -0600 received badge  Popular Question (source)
2020-09-13 01:50:46 -0600 received badge  Notable Question (source)
2020-05-09 22:36:47 -0600 received badge  Popular Question (source)
2019-12-28 19:25:49 -0600 asked a question Learning the background model using images

Learning the background model using images I have a set of images of a scene taken under slightly changing lighting cond

2018-12-31 03:54:46 -0600 edited question How warp an image without cv2.remap cropping it.

How warp an image without cv2.remap cropping it. Related question: https://stackoverflow.com/questions/53907633/how-to-w

2018-12-31 03:32:55 -0600 commented question How warp an image without cv2.remap cropping it.

See the link posted on top, for further info.

2018-12-31 03:29:04 -0600 asked a question How warp an image without cv2.remap cropping it.

How warp an image without cv2.remap cropping it. Related question: https://stackoverflow.com/questions/53907633/how-to-w

2018-12-24 03:51:25 -0600 commented question Assertion failed error when using cv2.remap()

xs = xs.reshape(nh, nw).astype(np.float32) ys = ys.reshape(nh, nw).astype(np.float32) doing this before passing the

2018-12-24 02:38:58 -0600 commented question Assertion failed error when using cv2.remap()

I just tried, it throws the same error.

2018-12-24 01:36:15 -0600 asked a question Assertion failed error when using cv2.remap()

Assertion failed error when using cv2.remap() I'm trying to generate "crumpled" images using images obtained from a fla

2018-08-09 04:46:31 -0600 commented answer Segmenting an image with similar background color.

I think its better if you open a new question.

2018-08-03 21:14:03 -0600 commented answer Wrong perspective transform

Any ideas on how to automatically order vertices instead of manually ordering them.

2018-08-01 07:18:18 -0600 commented question Wrong perspective transform

No, they don't. I have checked just now. These are the outputs of olp_pts and new_pts respectively. [[163. 14.] [3

2018-08-01 02:28:58 -0600 commented question Wrong perspective transform

I think the order of the points old_pts and new_pts are wrong. I tried flipping them over x-axis and tried all combinati

2018-08-01 01:02:29 -0600 commented question Wrong perspective transform

I think I'm the order of the points old_pts and new_pts are wrong. I tried flipping them over x-axis and tried all combi

2018-07-31 10:17:05 -0600 asked a question Wrong perspective transform

Wrong perspective transform I'm trying to do perspective transform of an image to realign the perspective. This is the i

2018-07-31 02:19:34 -0600 received badge  Critic (source)
2018-07-24 05:03:08 -0600 marked best answer How to find dimensions of an object in the image

I want to find the length of an object in the image (image length not the real physical length). My first idea is was to use boundingRect to find the dimensions, but some of the masks I have split in between them so the boundingRect method fails. Can someone suggest me a robust method to find the length of the object in the given mask

Example mask with split: Mask with split

2018-07-20 12:30:52 -0600 commented answer How to find dimensions of an object in the image

Elegant Solution !!

2018-07-20 08:05:27 -0600 received badge  Student (source)
2018-07-18 00:01:47 -0600 received badge  Enthusiast
2018-07-17 07:51:29 -0600 commented question How to find dimensions of an object in the image

I have got a simple solution for this problem, I will update tomorrow.

2018-07-17 01:23:36 -0600 asked a question How to find dimensions of an object in the image

How to find dimensions of an object in the image I want to find the length of an object in the image (image length not t

2018-07-06 03:51:57 -0600 commented answer Segmenting an image with similar background color.

Ofcourse, training from scratch doesn't sense when you have small dataset. Thank you for your inputs.

2018-07-06 03:41:11 -0600 commented answer Segmenting an image with similar background color.

My first idea was to try using deep learning but I don't have enough training images.

2018-07-05 09:54:46 -0600 asked a question Segmenting an image with similar background color.

Segmenting an image with similar background color. I have an image with similar background color and foregorund color. I

2018-06-30 13:51:31 -0600 asked a question Foreground segmentation when background and subject have nearly identical colour

Foreground segmentation when background and subject have nearly identical colour I have an image that has background and

2018-06-30 13:48:05 -0600 marked best answer How to trim a video based on a condition

I have a video from drone. I want to delete the part of video that has takeoff included. I want to retain the part where the drone is flying. Can someone suggest a method in OpenCV to achieve this ?

2018-06-30 13:48:04 -0600 received badge  Supporter (source)
2018-06-29 02:20:17 -0600 commented answer How to trim a video based on a condition

trimming the video isn't the issue, I want to automate the process using OpenCV. I want to find from which frame the dro

2018-06-29 00:34:02 -0600 received badge  Organizer (source)
2018-06-29 00:33:15 -0600 edited question How to trim a video based on a condition

How to trim a video based on a condition I have a video from drone. I want to delete the part of video that has takeoff

2018-06-29 00:32:53 -0600 edited question How to trim a video based on a condition

How to trim a video based on a condition I have a video from drone. I want to delete the part of video that has takeoff

2018-06-29 00:32:53 -0600 received badge  Editor (source)
2018-06-29 00:30:30 -0600 asked a question How to trim a video based on a condition

How to trim a video based on a condition I have a video from drone. I want to delete the part of video that has takeoff

2018-06-29 00:27:38 -0600 marked best answer OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor,

I'm trying to run a code that does template matching. I'm getting assertion failed error on cvtColor function.

Here is the error.

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/travis/miniconda/conda-
bld/conda_1485299292920/work/opencv-3.2.0/modules/imgproc/src/color.cpp, line 9748
Traceback (most recent call last):
File "opencv_basics.py", line 60, in <module>
img_gray = cv2.cvtColor(img_rgb,cv2.COLOR_BGR2GRAY)
cv2.error: /home/travis/miniconda/conda-bld/conda_1485299292920/work/opencv-
3.2.0/modules/imgproc/src/color.cpp:9748: error: (-215) scn == 3 || scn == 4 in function cvtColor

Here is the code I'm trying to run.

import cv2
import numpy as np

img_rgb = cv2.imread('template.jpg')
img_gray = cv2.cvtColor(img_rgb,cv2.COLOR_BGR2GRAY)

template = cv2.imread('opencv-template-for-matching.jpg',0)
w, h = template.shape[::-1]

res = cv2.matchTemplate(img_gray,template,cv2.TM_CCOEFF_NORMED)
threshold = 0.8
loc = np.where( res >= threshold)

for pt in zip(*loc[::-1]):
    cv2.rectangle(img_rgb, pt, (pt[0] + w, pt[1] + h), (0,255,255), 2)

cv2.imshow('Detected',img_rgb)
2018-06-29 00:27:38 -0600 received badge  Scholar (source)
2018-04-25 07:10:27 -0600 received badge  Famous Question (source)
2018-03-05 06:38:17 -0600 received badge  Notable Question (source)
2018-02-28 05:55:10 -0600 received badge  Popular Question (source)
2017-09-29 03:46:06 -0600 commented answer OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor,

How can I be so..... It was in the wrong path.

2017-09-29 03:42:52 -0600 commented answer OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor,

So I found out that the image is not getting loaded. What am I supposed to do? I checked the path, the image is there, b

2017-09-29 03:40:47 -0600 commented answer OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor,

So I found out that the image is not getting loaded. What am I supposed to do?

2017-09-29 03:30:45 -0600 asked a question OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor,

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, I'm trying to run a code that does template matching.