1. An obstacle detection device comprising: an image acquiring unit that captures an image obtained by picking up an image of an outside of an own vehicle; a processed image generating unit that generates a processed image for detecting an obstacle from the captured image; a small region dividing unit that divides the processed image into plural small regions; an edge threshold setting unit that sets an edge threshold for each of the small regions from pixel values of the plural small regions and the processed image; an edge extracting unit that calculates a gray gradient value of each of the small regions from the plural small regions and the processed image and generates, using the edge threshold for the small region corresponding to the calculated gray gradient value, a binary edge image and a gradient direction image having information concerning a direction of an edge; an obstacle recognizing unit that sets a matching determination region for detecting an obstacle in the edge image and determines presence or absence of an obstacle from the edge image in the matching determination region and the gradient direction image corresponding to the edge image; a recognition result output unit that outputs a result of the determination of presence or absence of an obstacle; an object position detecting unit that detects a position of an obstacle on the outside of the own vehicle on the basis of a detection signal from an obstacle detecting unit; and an own vehicle lighting detecting unit that detects whether the lamps of the own vehicle are on, wherein the small region dividing unit divides the processed image into the plural small regions on the basis of an illumination state on the outside of the own vehicle, and the small region dividing unit calculates, when the own vehicle lighting detecting unit detects that the lamps are on, height of illumination on the obstacle on the basis of the position of the obstacle from the object position detecting unit, an illumination angle of the own vehicle lamp set in advance, and height of the own vehicle lamp from a road surface and divides the processed image into the plural small regions with a coordinate on the image with respect to the calculated height of illumination on the obstacle as a boundary.