# Revision history [back]

### Acne Detection OpenCV

I'm working on an acne detection problem. So far I have applied a canny edge detector and want to find the five pimples on the cheek. I've been trying to use a HoughCircle detector but I can't seem to have any luck. Please let me know if y'all have a solution

import sys import cv2 import numpy as np from skimage import io from skimage import feature

def main(argv):

right_cheek_pic =  "right_cheek.jpg"
right_file = argv[0] if len(argv) > 0 else right_cheek_pic

gray = cv2.cvtColor(src1, cv2.COLOR_BGR2GRAY)
gray = cv2.medianBlur(gray, 7)

edges = cv2.Canny(gray,40,90)

rows = gray.shape[0]
param1=200, param2=100,

right_cheek_counter = 0
if circles is not None:

circles = np.uint16(np.around(circles))
for i in circles[0, :]:
right_cheek_counter += 1
center = (i[0], i[1])
# circle center
cv2.circle(edges, center, 1, (0, 100, 100), 3)
# circle outline