A refrigerator comprising: a compressor, a condenser, and an expansion unit that constitute a refrigeration cycle; an evaporator that evaporates a refrigerant that has passed through the expansion unit and includes a refrigerant pipe and cooling fins; a heating unit that provides heat for defrosting the evaporator; and a frost sensor unit that is provided at one side of the evaporator to sense the amount of frost on the evaporator, wherein the operation of the frost sensor unit starts on the basis of whether operation conditions of the frost sensor unit are recognized and the heating unit selectively generates heat in accordance with the sensing result of the frost sensor unit, and the frost sensor unit includes a photographing device that is provided at one side of the evaporator and operates to photograph the evaporator, wherein the photographing device includes a photographing unit that photographs frost on the evaporator and the surrounding background and a lighting unit that emits light to the evaporator when the photographing unit takes a picture, the refrigerator further comprising a control unit that determines the amount of frost on the evaporator from the image taken by the photographing device and controls the heating unit to operate when the amount of frost exceeds a predetermined amount, the control unit being configured to acquire pixel values that are proportioned to the amount of frost on the evaporator by applying image processing, characterized in that the image processing includes binarization that separates the frost from the background in the acquired image to determine the amount of frost on the evaporator, wherein the binarization is defined as binarizing the pixels values to 0 and to 1 or 255, in accordance with the brightness value of the acquired image, and when the brightness value of one or more pixels of the acquired image is greater than a critical value, the pixels values are recognized as 1 or 255 and determined as frost, and when the brightness value of one or more pixels of the acquired image is less than the critical value, the pixels values are recognized as 0 and determined as the background. a compressor, a condenser, and an expansion unit that constitute a refrigeration cycle; an evaporator that evaporates a refrigerant that has passed through the expansion unit and includes a refrigerant pipe and cooling fins; a heating unit that provides heat for defrosting the evaporator; and a frost sensor unit that is provided at one side of the evaporator to sense the amount of frost on the evaporator, wherein the operation of the frost sensor unit starts on the basis of whether operation conditions of the frost sensor unit are recognized and the heating unit selectively generates heat in accordance with the sensing result of the frost sensor unit, and the frost sensor unit includes a photographing device that is provided at one side of the evaporator and operates to photograph the evaporator, wherein the photographing device includes a photographing unit that photographs frost on the evaporator and the surrounding background and a lighting unit that emits light to the evaporator when the photographing unit takes a picture, the refrigerator further comprising a control unit that determines the amount of frost on the evaporator from the image taken by the photographing device and controls the heating unit to operate when the amount of frost exceeds a predetermined amount, the control unit being configured to acquire pixel values that are proportioned to the amount of frost on the evaporator by applying image processing, characterized in that the image processing includes binarization that separates the frost from the background in the acquired image to determine the amount of frost on the evaporator, wherein the binarization is defined as binarizing the pixels values to 0 and to 1 or 255, in accordance with the brightness value of the acquired image, and when the brightness value of one or more pixels of the acquired image is greater than a critical value, the pixels values are recognized as 1 or 255 and determined as frost, and when the brightness value of one or more pixels of the acquired image is less than the critical value, the pixels values are recognized as 0 and determined as the background.