A touch type input device comprising: a touch panel including a sensor array and an operation surface, wherein the sensor array includes drive electrodes and sensor electrodes insulated from and stacked on the drive electrodes, wherein the drive electrodes and the sensor electrodes are arranged in a grid-shaped pattern that forms capacitors at intersections of the drive electrodes and the sensor electrodes; and a controller that is configured to apply a drive signal to the drive electrodes and to detect touching of the operation surface of the touch panel from changes in capacitance of each capacitor, wherein the controller is configured to determine whether or not a conductive foreign matter exists on the operation surface by comparing a foreign matter determination threshold, which is set to a predetermined negative value, and raw data values indicating a change amount in the capacitance of each capacitor from an initial reference value that is set in advance for each capacitor, and to determine whether or not the operation surface has been touched by comparing a touch determination threshold, which is distinct from the foreign matter determination threshold and set to a predetermined positive value, and control data values indicating a change amount in the capacitance of each capacitor from a control reference value that is changed for each capacitor in accordance with whether or not the conductive foreign matter exists, wherein when the controller determines from the raw data values that the conductive foreign matter does not exist on the operation surface, the controller is configured to set the control reference value of each capacitor to the initial reference value, wherein when the controller determines from the raw data values that the conductive foreign matter exists on the operation surface, the controller is configured to set the control reference value of each capacitor to a raw data reference value corresponding to the present raw data value and assume that the capacitance for each capacitor is zero under a situation in which the conductive foreign matter is in contact with the operation surface. a touch panel including a sensor array and an operation surface, wherein the sensor array includes drive electrodes and sensor electrodes insulated from and stacked on the drive electrodes, wherein the drive electrodes and the sensor electrodes are arranged in a grid-shaped pattern that forms capacitors at intersections of the drive electrodes and the sensor electrodes; and a controller that is configured to apply a drive signal to the drive electrodes and to detect touching of the operation surface of the touch panel from changes in capacitance of each capacitor, wherein the controller is configured to determine whether or not a conductive foreign matter exists on the operation surface by comparing a foreign matter determination threshold, which is set to a predetermined negative value, and raw data values indicating a change amount in the capacitance of each capacitor from an initial reference value that is set in advance for each capacitor, and to determine whether or not the operation surface has been touched by comparing a touch determination threshold, which is distinct from the foreign matter determination threshold and set to a predetermined positive value, and control data values indicating a change amount in the capacitance of each capacitor from a control reference value that is changed for each capacitor in accordance with whether or not the conductive foreign matter exists, wherein when the controller determines from the raw data values that the conductive foreign matter does not exist on the operation surface, the controller is configured to set the control reference value of each capacitor to the initial reference value, wherein when the controller determines from the raw data values that the conductive foreign matter exists on the operation surface, the controller is configured to set the control reference value of each capacitor to a raw data reference value corresponding to the present raw data value and assume that the capacitance for each capacitor is zero under a situation in which the conductive foreign matter is in contact with the operation surface.