detection

How to detect if the mouse is inside the whole form and child controls?

强颜欢笑 提交于 2019-11-27 22:29:07
I need to detect when the user moves the mouse over the Form and all its child controls and also when it leaves the Form. I tried the MouseEnter and MouseLeave events of the Form, I tried the WM_MOUSEMOVE & WM_MOUSELEAVE and WM_NCMOUSEMOVE & WM_NCMOUSELEAVE pairs of windows messages but none seem to work as I want... Most of my Form is occupied by child controls of many sorts, there's not much client area visible. This means that if I move the mouse very quickly the mouse movement will not be detected, although the mouse is inside the Form. For instance, I have a TextBox that is docked at the

OpenCV speed traffic sign detection

允我心安 提交于 2019-11-27 21:54:13
问题 I have a problem detecting speed traffic signs with opencv 2.4 for Android. I do the following: "capture frame -> convert it to HSV -> extract red areas -> detect signs with ellipse detection" So far ellipse detection works perfect as long as picture is good quality. But as you see in pictures bellow, that red extraction does not work OK, because of poor quality of picture frames, by my opinion. Converting original image to HSV: Imgproc.cvtColor(this.source, this.source, Imgproc.COLOR_RGB2HSV

OpenCV C++ - Rectangle detection which has irregular side

扶醉桌前 提交于 2019-11-27 21:26:26
问题 Hi.. I have problem with rectangle detection which has irregular side (not straight) like figure above. actually with method houghline can detect lines on the rectangle with some parameter configuration. After compute intersect and get 4 corner, I can rotate it to normal position. But if I change the image with another rectangle (different size and still has irregular side), I need to reconfigure the parameters again. This is because the line is not detected on four sides, beside that the

TensorFlow Object Detection API - what do the losses mean in the object detection api?

让人想犯罪 __ 提交于 2019-11-27 17:55:49
问题 What do each for the following losses mean? (in the TensorFlow Object detection API, while training FasterRCNN based models) Loss/BoxClassifierLoss/classification_loss/mul_1 Loss/BoxClassifierLoss/localization_loss/mul_1 Loss/RPNLoss/localization_loss/mul_1 Loss/RPNLoss/objectness_loss/mul_1 clone_loss_1 回答1: The losses for the Region Proposal Network: Loss/RPNLoss/localization_loss/mul_1 : Localization Loss or the Loss of the Bounding Box regressor for the RPN Loss/RPNLoss/objectness_loss

How to detect the physical connected state of a network cable/connector?

怎甘沉沦 提交于 2019-11-27 16:35:28
In a Linux environment, I need to detect the physical connected or disconnected state of an RJ45 connector to its socket. Preferably using BASH scripting only. The following solutions which have been proposed on other sites do NOT work for this purpose: Using 'ifconfig' - since a network cable may be connected but the network not properly configured or not currently up. Ping a host - since the product will be within a LAN using an unknown network configuration and unknown hosts. Isn't there some state which can be used in the /proc file system (everything else is in there)? How is the Linux

Determine Browser's Version

倾然丶 夕夏残阳落幕 提交于 2019-11-27 16:30:40
How do I get the browser version? I have done the browser detection part but every browser have different algorithm of its version release and its hard to get it. I already have looked in PHP's manual about get-browser function but every script seems out of my brain. You can get it easily with get_browser() <?php $browser = get_browser(); $version = $browser->version; Your only chance is to grab the User-Agent from the $_SERVER array. And there is no rule that forces a browser to include its version. A google search for 'php browser version detection' return get_browser() as the first result.

Cycle detection in linked list with the Hare and Tortoise approach

北慕城南 提交于 2019-11-27 13:55:10
问题 I understand that in order to detect a cycle in a linked list I can use the Hare and Tortoise approach, which holds 2 pointers (slow and fast ones). However, after reading in wiki and other resources, I do not understand why is it guaranteed that the two pointers will meet in O(n) time complexity. 回答1: Here's an attempt at an informal proof. The shape of the cycle doesn't matter. It can have a long tail, and a loop towards the end, or just a loop from the beginning to the end without a tail.

Detecting Operating Systems in Ruby [duplicate]

落花浮王杯 提交于 2019-11-27 12:01:59
This question already has an answer here: How can I find which operating system my Ruby program is running on? 10 answers Is there a way to detect the operating system in ruby? I am working on developing a sketchup tool that will need to detect Mac vs. Windows. debbie You can use the os gem: gem install os And then require 'os' OS.linux? #=> true or false OS.windows? #=> true or false OS.java? #=> true or false OS.bsd? #=> true or false OS.mac? #=> true or false # and so on. See: https://github.com/rdp/os Here is the best one I have seen recently. It is from selenium. The reason I think it is

Detect which image is sharper

匆匆过客 提交于 2019-11-27 10:01:29
问题 I'm looking for a way to detect which of two (similar) images is sharper. I'm thinking this could be using some measure of overall sharpness and generating a score (hypothetical example: image1 has sharpness score of 9, image2 has sharpness score of 7; so image1 is sharper) I've done some searches for sharpness detection/scoring algorithms, but have only come across ones that will enhance image sharpness. Has anyone done something like this, or have any useful resources/leads? I would be

Detecting colors for an Image using PHP

China☆狼群 提交于 2019-11-27 09:47:17
问题 How can I detect the top 2 colors of an Image in PHP? for example I have this image: This function/process will return: 0000FF or blue and FFFF00 or YELLOW Thanks 回答1: Here's a script that will give you the list: function detectColors($image, $num, $level = 5) { $level = (int)$level; $palette = array(); $size = getimagesize($image); if(!$size) { return FALSE; } switch($size['mime']) { case 'image/jpeg': $img = imagecreatefromjpeg($image); break; case 'image/png': $img = imagecreatefrompng(