detection

OpenCV Facial Detection come ups with this error

匆匆过客 提交于 2021-02-11 16:56:57
问题 I keep getting this error: faces = face_cascade.detectMultiScale(gray, 1.3, 5) cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' when trying to run this code import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascase_frontalface_default.xml') cap = cv2.VideoCapture(0) while 1: ret, img = cap

OpenCV Facial Detection come ups with this error

£可爱£侵袭症+ 提交于 2021-02-11 16:55:38
问题 I keep getting this error: faces = face_cascade.detectMultiScale(gray, 1.3, 5) cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' when trying to run this code import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascase_frontalface_default.xml') cap = cv2.VideoCapture(0) while 1: ret, img = cap

Detect custom shape OpenCV

心已入冬 提交于 2021-02-07 19:15:34
问题 I want to find custom shape in OpenCV. Shape is previously defined. I want to detect if this shape is equal or not equal to the current shape using WebCam in real time. How can I do that? How to compare pre-defined custom shape and current shape? 回答1: As the commenters have eluded, you can use template matching to detect custom shapes. So What Is Template Matching? Template matching is a technique in digital image processing for finding small parts of an image which match a template image. It

Detect custom shape OpenCV

一个人想着一个人 提交于 2021-02-07 19:05:51
问题 I want to find custom shape in OpenCV. Shape is previously defined. I want to detect if this shape is equal or not equal to the current shape using WebCam in real time. How can I do that? How to compare pre-defined custom shape and current shape? 回答1: As the commenters have eluded, you can use template matching to detect custom shapes. So What Is Template Matching? Template matching is a technique in digital image processing for finding small parts of an image which match a template image. It

Detect custom shape OpenCV

折月煮酒 提交于 2021-02-07 19:04:26
问题 I want to find custom shape in OpenCV. Shape is previously defined. I want to detect if this shape is equal or not equal to the current shape using WebCam in real time. How can I do that? How to compare pre-defined custom shape and current shape? 回答1: As the commenters have eluded, you can use template matching to detect custom shapes. So What Is Template Matching? Template matching is a technique in digital image processing for finding small parts of an image which match a template image. It

OpenCV: How to detect rhombus on image?

懵懂的女人 提交于 2021-02-07 10:44:54
问题 I hame some image with plane which have perspective transform. I need to detect center of each white rhombus or rhombus itself. Here is examples: As I unserstand the problem can be solved by simple template matching if we rectify image, but I need to do it automatically. Is there any functions in OpenCV suitable for this task? Any other ideas? 回答1: Here are two quick tests I just did without correcting the perspective issue. Pure mathematical morphology : Extract the red channel Big white top

Mail address validation JAVA

冷暖自知 提交于 2021-02-05 08:24:30
问题 I'm trying to write a little program where I ask the user to enter an email address. And then I verify if its a valid email address or not. Like "example@example.com" would be valid, but "example@@example.com.org" would be invalid. Here's my code, I have made it work to detect if there is an @ and . character in there, but I need to make sure it only appears once, and that the @ appears before the dot (.) import java.util.Scanner; public class email { public static void main(String args[]) {

How to detect android device rotation parallel to the ground?

女生的网名这么多〃 提交于 2021-01-29 02:10:17
问题 As I know, the most of android devices allows to detect rotation by accelerometer, but I've noticed, that it doesn't detect rotation parallel to the ground. For example, if I put the device on a table and turn it around, no one of accelerometer indicators doesn't change. At the picture, it's called "alfa" rotation. So how can I detect this kind of turning? 回答1: For sensing rotation around z-axis you need to implement a compass function. A good tutorial is this one. To make the resulting

Snort not detecting Pings with other devices

☆樱花仙子☆ 提交于 2021-01-28 09:40:57
问题 I have a problem with Snort, I've just installed the program on a R-Pi. 2 other computers on the same network can ping the R-Pi with success. However I had the idea that snort was able to be run in Promiscuous mode meaning that it can see all traffic in a local network... without needing to run it inline in the network. When i try ping the other two computers in the same network Snort does not pick this up. Changes i have tried.... Ruleset set to - alert icmp any any -> any any Config file

Snort not detecting Pings with other devices

我们两清 提交于 2021-01-28 09:35:29
问题 I have a problem with Snort, I've just installed the program on a R-Pi. 2 other computers on the same network can ping the R-Pi with success. However I had the idea that snort was able to be run in Promiscuous mode meaning that it can see all traffic in a local network... without needing to run it inline in the network. When i try ping the other two computers in the same network Snort does not pick this up. Changes i have tried.... Ruleset set to - alert icmp any any -> any any Config file