Foreign matter detection device, card reader, foreign matter detection method and recording medium preliminary
A foreign matter detection device which detects a foreign matter in an inside of a card reader. The foreign matter detection device includes a control part which performs control for causing an imaging device provided in the inside of the card reader to image a space in the inside of the card reader, and a detection part which detects the foreign matter in the space by image analysis based on a captured image obtained by the imaging device.
1. A foreign matter detection device which detects a foreign matter in an inside of a card reader, the foreign matter detection device comprising:
a control part which performs control for causing an imaging device provided in the inside of the card reader to image a space in the inside of the card reader; and
a detection part which detects the foreign matter in the space by image analysis based on a captured image obtained by the imaging device, wherein
the control part causes the imaging device to image the space at a first timing before a card taking-in operation of the card reader and at a second timing after a card eject operation of the card reader performed after the card taking-in operation, and
the detection part detects the foreign matter based on a comparison between a first captured image which is obtained by imaging of the imaging device at the first timing and a second captured image obtained by the imaging of the imaging device at the second timing, wherein the second captured image is obtained after the first captured image.
2. The foreign matter detection device according to claim 1 , wherein
the space is a space to which a magnetic data swindle member for swindling magnetic data of a magnetic card to be attached, and
the foreign matter comprises the magnetic data swindle member.
3. The foreign matter detection device according to claim 2 , wherein
a hole which is available for fixing of the magnetic data swindle member exists in the space,
the detection part detects a region of the hole in the captured image, and
the foreign matter is detected by image analysis of the region having been detected.
4. The foreign matter detection device according to claim 1 , wherein
the inside of the card reader is provided with a light source configured to emit light to the space, and
the control part performs control which causes the light source to emit light at an imaging time by the imaging device.
5. The foreign matter detection device according to claim 1 , wherein in a case that the detection part detects the foreign matter, the detection part discriminates the foreign matter by image analysis based on the captured image.
6. A card reader comprising the foreign matter detection device defined in claim 1 .
7. A foreign matter detection method for detecting a foreign matter in an inside of a card reader, the foreign matter detection method comprising:
performing control which causes an imaging device provided in the inside of the card reader to image a space in the inside of the card reader;
detecting the foreign matter in the space by image analysis based on a captured image obtained by the imaging device;
causing the imaging device to image the space at a first timing before a card taking-in operation of the card reader and at a second timing after a card eject operation of the card reader performed after the card taking-in operation; and
detecting the foreign matter based on a comparison between a first captured image which is obtained by imaging of the imaging device at the first timing and a second captured image obtained by the imaging of the imaging device at the second timing, wherein the second captured image is obtained after the first captured image.
8. A non-transient computer-readable recording medium, recording a foreign matter detection program for detecting a foreign matter in an inside of a card reader, the foreign matter detection program causing a processor to execute:
control which causes an imaging device provided in the inside of the card reader to image a space in the inside of the card reader;
detection of the foreign matter in the space by image analysis based on a captured image obtained by the imaging device;
control which causes the imaging device to image the space at a first timing before a card taking-in operation of the card reader and at a second timing after a card eject operation of the card reader performed after the card taking-in operation; and
detection of the foreign matter based on a comparison between a first captured image which is obtained by imaging of the imaging device at the first timing and a second captured image obtained by the imaging of the imaging device at the second timing, wherein the second captured image is obtained after the first captured image.