Patent ID: 8798344

Claim:
an image processing apparatus comprising: a processor; and a memory storing computer-readable instructions that, when executed by the processor, implement: a candidate point extraction unit which extracts, from an image, candidate points which are candidates for points constituting a circular region that represents a bubble; and a circular-region detecting unit which detects a circular region in the image on the basis of information belonging to the candidate points; wherein the circular-region detecting unit comprises: an estimation-use candidate point extraction unit which extracts, from among candidate points extracted by the candidate point extraction unit, a plurality of estimation-use candidate points which are used for estimating a circular region; a circular-shape estimation unit which estimates a circular region on the basis of the plurality of estimation-use candidate points extracted by the estimation-use candidate point extraction unit; an evaluation value calculation unit which calculates an evaluation value used for determining whether the estimated circular region actually exists in the image; and a determination unit which determines whether the circular region actually exists in the image based on the evaluation value; wherein the candidate point extracting comprises: calculating gradient magnitudes of a plurality of pixels contained in the image.