color-detection

How can I change the color of my text based on the color of the ImageView it overlays?

偶尔善良 提交于 2021-01-21 05:04:51
问题 So I've got transparant buttons with white text labels set up over a user uploaded ImageView . If the user uploads an image that is mostly white, then the buttons are hard to see if not completely invisible. Does anyone know of a way to get the average color of a ImageView 's source picture/drawable? If I can do this, I can compare it to a certain threshold I can trial and error for... If I can get this, then I can change the color of the text on my buttons to the inverted version of this

Detecting warm colors in the Python image

雨燕双飞 提交于 2020-12-15 06:49:22
问题 I have a problem and I need your help. I have a series of thermographic images, of which I need to detect the hot spot (shown in the bar to the right of the image) in the area where the analysis is being done. In the case of these example images, the hot spot is in the focus of the crosshair, however, the goal is to imagine that I don't know where this point is and that the algorithm itself finds it, based on the bar on the right. I leave below some of these images as an example: IR_1544.jpg

Color Detection not efficient on webcam images

风格不统一 提交于 2020-07-22 21:33:11
问题 I am working on a project where I'm trying to detect green and red circles on a specific surface (arena). When I try to do so with the digital version of that arena (PNG image), I can successfully detect both the colored circles. Here's the digital image of the surface: Now, I printed this arena on a flex(without those two colored circles ), and manually placed coloured circular coins on it. But after capturing its image through a 1.3 MP webcam, the color detection didn't work and gave false

Detect circles with specific colors using opencv

£可爱£侵袭症+ 提交于 2020-04-05 05:26:30
问题 I have to detect yellow circles in an image using OpenCV and python, as shown in the first image: Once I detect the yellow circle, I have to highlight it, like so: I am new to OpenCV, so I was looking for some guidance or help. All help is appreciated 回答1: Here's a potential approach: Convert image to HSV Find upper/lower color boundaries and create a mask Find contours and filter using the number of vertices We convert image to HSV and then determine lower and upper boundaries to create a

Having difficulties to detect certain colors using openCV

こ雲淡風輕ζ 提交于 2019-12-13 01:15:52
问题 I have a project in which i must detect 3 specific colors in many leaves pictures: Green, Yellow and Brown. I'm using the following image as an example: The objective to detect the different colors is to determine if the tree is sick or not, so it's really important to be able to tell correctly what is green, yellow and brown, even in small amounts of pixels. I wrote the following code: //Load the image Mat img_bgr = imread("c:\\testeimagem\\theeye\\greening32.jpg", 1); if (img_bgr.empty()){

Comparing two sprites colors based on random colorization?

孤街浪徒 提交于 2019-12-12 03:37:47
问题 This code colorizes my ball. var colorize1 = SKAction.colorizeWithColor(.redColor(), colorBlendFactor: 1.0, duration: 0.3) var colorize2 = SKAction.colorizeWithColor(.greenColor(), colorBlendFactor: 1.0, duration: 0.3) var colorize3 = SKAction.colorizeWithColor(.blueColor(), colorBlendFactor: 1.0, duration: 0.3) var actions = [colorize1, colorize2, colorize3] var randomIndex = Int(arc4random_uniform(3)) var action = actions[randomIndex] let seconds = 0.14 let delay = seconds * Double(NSEC_PER

Java and OpenCV color detection

微笑、不失礼 提交于 2019-12-11 22:11:30
问题 I'm working on a project at school, which basically is: writing an application to make a drone fly autonomously, and through scanning QR-codes hung up on walls, be able to navigate through a room in order to complete a certain task. What I am currently working on, is for the drone to detect cardboard boxes (working as obstacles). These boxes are white, and have a blue circle on them. How I'm planning to solve this, is by scanning the frame for colors and squares: If the drone detects a square

Detecting colors in an Image in sequence using opencv [closed]

限于喜欢 提交于 2019-12-11 07:48:01
问题 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 3 months ago . I am working on a project where I need to recognize colors in sequential order from an Image I am new to openCv. Help needed. Image here 回答1: since I think that you have to recognize colors inside the squares, not all colours in the image, you should first of all detect all

Detect white background on images using python

北城以北 提交于 2019-12-11 01:04:54
问题 Is there a way to tell whether an image as a white background using python and what could be a good strategy to get a "percentage of confidence" about this question? Seems like the literature on internet doesn't cover exactly this case and I can't find anything strictly related. The images I want to analyze are typical e-commerce website product pictures, so they should have a single focused object in the middle and white background only at the borders. Another information that could be

Collision detection leading to color detection? [duplicate]

和自甴很熟 提交于 2019-12-08 09:34:32
问题 This question already exists : Do an SKAction if the colors of two sprites aren't the same? [duplicate] Closed 3 years ago . How can I check if, when I collide with an SKSpriteNode in the middle of two rectangles with a ball, the ball and the two rectangles are the same color? For example, if my two rectangles are red, and my ball is blue, I want it to detect that the colors of my rectangle and the ball are different. If they are the same color, then I don't want anything to happen. If they