detect

How to detect blue color object using opencv

混江龙づ霸主 提交于 2019-12-04 11:45:13
i'm using that guide to detect blobs of a certain color. On that guide, it check for orange's blob and it use this values: int orange[3] = {200, 250, 10}; On the guide it says that this values represents the orange in HSV. I don't know how they calculate this values but i try to check for blue value converting from rgb to hsv but it doesn't work. What i have to detect is this color: Any ideas on how to determinate HSV values to detect colors? thanks!! For blue , it can be used as HSV values : [120,255,255] I calculated it from GIMP , an open-source image processing tool like Photoshop.

Portable way to detect heap fragmentation in c++ at runtime?

无人久伴 提交于 2019-12-04 11:15:19
I'm writing a qt-based c++ application and i need to be able to detect memory fragmentation in order to check if the current system can actually sustain the memory load: the program load a big image (15/21 megapixels are the norm) in memory and then perform some filtering on it (w/ sparse matrices). For instance, i'm having memory fragmentation problem in Windows and VMMap has been very helpful in this: the problem was some DLLs (Wacom tablet "wintab32.dll" and the UltraMon app) doesn't get relocated so are splitting the address space at the 0x10000000-0x30000000 VA of the process. I want to

How to determine if jQuery is running on a page (even if jQuery is /after/ the detection script)

非 Y 不嫁゛ 提交于 2019-12-04 10:45:22
问题 I'm working on a do-dad that can be embedded in a page like a youtube video. The particular effect I want needs jQuery to work. I want to load jQuery on the condition that something on the page hasn't already added jQuery. I though of testing if (typeof($)=='function'){... but that only works if jQuery is loaded & running by the time the page gets to my script. Since best practices these days is to embed you scripts in the footer, my embed code probably will never see jQuery most of the time

Detect end of performSelectorInBackground:withObject:

你说的曾经没有我的故事 提交于 2019-12-04 10:40:36
I have an asynchronous server request in my iOS app: [self performSelectorInBackground:@selector(doSomething) withObject:nil]; How can I detect the end of this operation? Put a call at the end of the doSomething method?! - (void)doSomething { // Thread starts here // Do something // Thread ends here [self performSelectorOnMainThread:@selector(doSomethingDone) withObject:nil waitUntilDone:NO]; } Nathan Jones If you just want to know when it's finished (and don't want to pass much data back - at which point I would recommend a delegate) you could simply post a notification to the notification

Android - Detect doubletap AND tripletap on view

眉间皱痕 提交于 2019-12-04 08:36:45
问题 I've been trying to build a tap detector that can detect both double and tripe tap. After my efforts failed I searched a long time on the net to find something ready to use but no luck! It's strange that libraries for something like this are so scarce. Any help ?? 回答1: You can try something like this. Though I would generally recommend against using triple taps as a pattern as it is not something users are generally used to, so unless it's properly communicated to them, most might never know

java-buildpack源码分析之Detect

穿精又带淫゛_ 提交于 2019-12-04 06:32:16
Detect 该buildpack的探测的内容包含:容器,JRE,框架。具体内容在components.yml中可以看到: # Configuration for components to use in the buildpack --- containers: - "JavaBuildpack::Container::DistZip" - "JavaBuildpack::Container::Groovy" - "JavaBuildpack::Container::JavaMain" - "JavaBuildpack::Container::PlayFramework" - "JavaBuildpack::Container::Ratpack" - "JavaBuildpack::Container::SpringBoot" - "JavaBuildpack::Container::SpringBootCLI" - "JavaBuildpack::Container::Tomcat" # In order to use Oracle JREs instead of OpenJDK, you must comment out the OpenJDK line and uncomment the Oracle line. # Please see the documentation

How to detect when user delete the app from Facebook

南楼画角 提交于 2019-12-04 03:53:46
问题 I'm new to using the Facebook SDK and I wondered how detect when the user deletes the app from his Facebook account. Currently if we delete the app, and we want to post something from my app, I'm getting an error message. 回答1: Try this: [FBSession renewSystemCredentials:^(ACAccountCredentialRenewResult result, NSError *error) { if (!error) { if (result == ACAccountCredentialRenewResultRejected) { NSLog(@"Facebook app deleted"); } } else { NSLog(@"Error: %@", error); } }]; 回答2: http:/

PHP detect Internet Explorer that is below version 10

孤街浪徒 提交于 2019-12-04 03:38:31
问题 Could someone do this for me? As I only have macs and cannot test IE. What's a good way of running an event IF the browser is Internet Explorer, and the version is under 10. So say it's IE 7, it will show the error, or if it's IE 9.9, it will show the error, however if it's IE 10, 10.1, 10.0.1 etc it will not show the error. 回答1: The function get_browser() may be used for feature detection. If you really want to only know the user's browser version you can look at the $_SERVER['HTTP_USER

How to client-side detect when a page is bookmarked?

左心房为你撑大大i 提交于 2019-12-04 01:56:07
问题 Is it possible to detect when a page is bookmarked within the browser, using Javascript? 回答1: No, AFAIK this is not possible. 回答2: Most browsers will not let you detect when a page is bookmarked because this would be another vector for Browser History Mining exploits. If malicious code could tell what websites you've used then, for example: At best, they'd know things about you that you might wish to keep private. They could use that information to target you with embarrassing ads or to

Android: Detect SMS Outgoing, Incorrect Count

血红的双手。 提交于 2019-12-04 01:09:13
问题 I am trying to make an application to count the number of outgoing SMS messages from a phone. Presently I have the following code: private void listenForSMS(){ Log.v("SMSTEST", "STARTED LISTENING FOR SMS OUTGOING"); Handler handle = new Handler(){}; SMSObserver myObserver = new SMSObserver(handle); ContentResolver contentResolver = getContentResolver(); contentResolver.registerContentObserver(Uri.parse("content://sms"),true, myObserver); } private class SMSObserver extends ContentObserver{