detection

Algorithm to find the coordinates of a corner in a simple image

孤街醉人 提交于 2019-12-14 02:17:33
问题 I have a bitmap where two large blocks of colors intersect, and I would like to find the intersection of these two blocks. Note that I do not know the actual geometry of the two shapes, because this is all just raw pixel data. Is there any algorithm I could use to do this? 回答1: If you have all the pixel data in memory (which I'd assume you do, but this is a major sticking point) and there are only two distinct colours, all you should need to do is run a horizontal scanline to find the point

Django detect dominant color of an image

两盒软妹~` 提交于 2019-12-14 02:07:51
问题 I have a blog with a lot of articles, I was wondering how to build a function that can detect the dominant color of each article image and for each article set the background with the dominant color. (I am using Django +1.8 and Python 3.4.x) I'm trying to build it from scratch, what are the steps? What should the color detection function looks like? any thoughts/suggestions? 回答1: Yeah I just wanted a schema of how it would work on django Let's assume a skeleton similar to below class Article

Detect font in a image

北慕城南 提交于 2019-12-13 15:21:26
问题 I have a very strange requirement that the font of text in a JPG image should be detected. How can it be done? I wonder is there any way to do so. thanks in advance! 回答1: You can try these services: WhatTheFont I think that is the most accurate service to identify the font in a image, not fully automated and with limitations (it will only match what is in the MyFonts library) I recommend to use this if you want something really reliable Matcherator It will also match what is in its own

Can a Perl script detect whether it's running under Activestate vs Strawberry Perl?

你。 提交于 2019-12-13 14:15:28
问题 I have a Perl script I'm still trying to debug and in the process I've noticed that it behaves differently running under ActivePerl and Strawberry Perl. This has led me to wonder how a Perl script might detect under which of these flavours it is running. 回答1: ActivePerl on Windows always (or at least since Perl 5.005) defines the Win32::BuildNumber() function, so you can check for it at runtime: if (defined &Win32::BuildNumber) { say "This is ActivePerl"; } else { say "This is NOT ActivePerl"

Can I use OpenCV to analyze image content? [closed]

£可爱£侵袭症+ 提交于 2019-12-13 10:13:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I want to detect content of images. For example I want to use the above image as an input, and get as output list of terms like: sky, water, sea, buildings etc. Any idea how to start? 回答1: The short answer is: yes. Below is a quick first effort, using OpenCV - essentially I just

Shake Detection iPhone 3.0 not working

不羁岁月 提交于 2019-12-13 08:59:22
问题 I have a ViewController that works perfectly with a button that trigger an action. I would like to replace the button with a shake event so I've googled it around and created a ShakeDetector class that ineherits from UIView and my implementation is as follow: @implementation ShakeDetector - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event { } - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event { if (motion == UIEventSubtypeMotionShake ) { // User was

Hough Transform: improving algorithm efficiency over OpenCL

与世无争的帅哥 提交于 2019-12-13 05:33:52
问题 I am trying to detect a circle in binary image using hough transform. When I use Opencv's built-in function for the circular hough transform, it is OK and I can find the circle. Now I try to write my own 'kernel' code for doing hough transform but is very very slow: kernel void hough_circle(read_only image2d_t imageIn, global int* in,const int w_hough,__global int * circle) { sampler_t sampler=CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST; int gid0 = get_global

Thick horizontal line detection

淺唱寂寞╮ 提交于 2019-12-13 04:09:24
问题 Please suggest me some methods on thick horizontal line detection in images. Any papers, libraries etc please. 回答1: Binary threshold the image, then use a combination of morphological operations to detect "borders that are thicker then N1 but thinner than N2" to produce several images and combine (logically AND) them to selectively detect borders of a certain expected thickness. 回答2: OpenCV is a good library. You may use a Hough transform to detect lines. Note that the answer may depend on

Is it possible to detect pairs of connected pixels?

时光怂恿深爱的人放手 提交于 2019-12-13 03:43:48
问题 I'm using OpenCV via Python 3.7. I have a following image (please take note of some red pixels on white areas): I know x and y coordinates of every red pixel in the image. I want to find all red pixels pairs that're interconnected by single white lines. Let's label every red pixel with id (blue number): As you can see, the topmost red pixel labeled "1" has only two straight connections: one with a red pixel labeled "2" and one with a red pixel labeled "3". I'd like to get a list of tuples,

how to know if a color is detected on opencv [duplicate]

你。 提交于 2019-12-13 03:15:27
问题 This question already has an answer here : python opencv color tracking (1 answer) Closed 2 months ago . I'm currently working on a project including color detection. I'm using opencv on python to do so, I can detect the color I want, i.e. blue, but I cannot manage to make the software know that this color has been detected. Here is the code I have. ` hsv_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) boundaries = [([94, 90, 45], [145, 255, 255])] # loop over the boundaries for (lower, upper)