PHOTOGRAPHIC DEVICE AND AI-BASED OBJECT RECOGNITION METHOD THEREOF
20220398774 · 2022-12-15
Inventors
- I-Hau YEH (Hsinchu City, TW)
- Chia-Hsing LIN (Hsinchu City, TW)
- Chih-Sheng Huang (Hsinchu City, TW)
- Kuo-Ching HUNG (Hsinchu County, TW)
Cpc classification
Y02T10/40
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G06V10/24
PHYSICS
International classification
Abstract
An AI-based object recognition method is provided to recognize an object in a first image captured by a photographic device at a first shooting angle. The method includes: Step A, determining a difference value between the first shooting angle and a preset second shooting angle; Step B, converting the first image into a second image with a view angle of the second shooting angle when the difference value is greater than a preset value; and Step C, sending the second image to an artificial intelligence model for recognition.
Claims
1. An artificial-intelligence-based object recognition method, which is used to recognize an object in a first image captured by a photographic device at a first shooting angle, comprising the steps of: Step A: determining a difference value between the first shooting angle and a second shooting angle, wherein the second shooting angle is preset; Step B: when the difference value is greater than a preset value, converting the first image into a second image with a view angle of the second shooting angle; and Step C: providing the second image to an artificial intelligence model for recognition.
2. The artificial-intelligence-based object recognition method according to claim 1, wherein the artificial intelligence model is trained with image data captured at the second shooting angle.
3. The artificial-intelligence-based object recognition method according to claim 1, wherein the Step A comprises: determining the first shooting angle with a 3-axis accelerometer chip; and subtracting the second shooting angle from the first shooting angle to acquire the difference value.
4. The artificial-intelligence-based object recognition method according to claim 1, wherein the Step A comprises: finding a central point and a positioning marker from the first image; and calculating the difference value based on positions of the central point, the positioning marker, and a preset positioning point.
5. The artificial-intelligence-based object recognition method according to claim 4, wherein the Step B comprises converting the first image into the second image according to equations:
Xp=(X−Lpm)*((Lpm+Lpc)/Lpc)*αx+βx; and
Yp=(Y−Hpm)*((Lpm+Lpc)/Lpc)*αy+βy, wherein X and Y are coordinates of each pixel in the first image; Xp and Yp are coordinates of each pixel in the second image; Lpm is a distance between the positioning marker and the preset positioning point in the horizontal direction; Lpc is a distance between the preset positioning point and the central point in the horizontal direction; Hpm is a distance between the positioning marker and the preset positioning point in the vertical direction; values of αx, βx, αy, and βy are preset.
6. The artificial-intelligence-based object recognition method according to claim 1, wherein the Step B comprises: Step B1: generating a perspective transformation matrix according to the difference value; and Step B2: converting the first image into the second image according to the perspective transformation matrix.
7. The artificial-intelligence-based object recognition method according to claim 1, wherein the Step B comprises: converting the first image into the second image with perspective transformation.
8. A photographic device, comprising: a lens; an optical sensor, coupled to the lens and configured to generate a first image; an image processing chip, coupled with the optical sensor, configured to determine a difference value between a first shooting angle at which the lens is currently capturing and a second shooting angle which is preset, and when the difference value is greater than a preset value, converting the first image into a second image with a view angle of the second shooting angle; and an artificial intelligence model, coupled with the image processing chip and configured to recognize an object in the second image.
9. The photographic device according to claim 8, wherein the artificial intelligence model is trained with image data captured at the second shooting angle.
10. The photographic device according to claim 8, further comprising a 3-axis accelerometer chip coupled to the image processing chip, wherein the 3-axis accelerometer chip is configured to determine the first shooting angle and then provide the first shooting angle to the image processing chip.
11. The photographic device according to claim 10, wherein the image processing chip is configured to subtract the second shooting angle from the first shooting angle to acquire the difference value.
12. The photographic device according to claim 8, wherein the image processing chip is configured to find a central point and a positioning marker from the first image and then calculate the difference value based on positions of the central point, the positioning marker, and a preset positioning point.
13. The photographic device according to claim 12, wherein the image processing chip is configured to transform the first image into the second image according to equations:
Xp=(X−Lpm)*((Lpm+Lpc)/Lpc)*αx+βx; and
Yp=(Y−Hpm)*((Lpm+Lpc)/Lpc)*αy+βy, wherein X and Y are coordinates of each pixel in the first image; Xp and Yp are coordinates of each pixel in the second image; Lpm is a distance between the positioning marker and the preset positioning point in the horizontal direction; Lpc is a distance between the preset positioning point and the central point in the horizontal direction; Hpm is a distance between the positioning marker and the preset positioning point in the vertical direction; values of αx, βx, αy, and βy are preset.
14. The photographic device according to claim 8, wherein the image processing chip is configured to generate a perspective transformation matrix according to the difference value and then transform the first image into the second image according to the perspective transformation matrix.
15. The photographic device according to claim 8, wherein the image processing chip is configured to transform the first image into the second image with perspective transformation.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
DETAILED DESCRIPTION OF THE INVENTION
[0016]
[0017] In one embodiment of Step S11, the photographic device determines whether to calibrate the first image according to a calibration parameter. For example, when the calibration parameter is “1”, it indicates that calibration is required; when the calibration parameter is “0”, it indicates that calibration is not required. An embodiment of determining the calibration parameter is shown in
[0018]
[0019]
and then acquires:
X′=a11*X+a12*Y+a13;
Y′=a21*X+a22*Y+a23; and
Z′=a31*X+a32*Y+a33,
wherein a11-a33 are preset values. Then, the image processing chip 14 can acquire the equations for calculating the coordinates of pixels in the second image 17:
Xp=X′/Z′; and
Yp=Y′/Z′.
[0020] The AI chip 15 includes an AI model 151. The AI model 151 uses artificial intelligence to recognize objects in the second image. In one embodiment, the AI model is the MobileNet-SSD. In one embodiment, the AI chip 15 and the image processing chip 14 are integrated to be a single chip.
[0021]
Xp=(X−Lpm)*((Lpm+Lpc)/Lpc)*αx+βx; and
Yp=(Y−Hpm)*((Lpm+Lpc)/Lpc)*αy+βy,
wherein X and Y are the coordinates of each pixel in the first image; Xp and Yp are the coordinates of each pixel in the second image; Hpm is the distance between the positioning marker 32 and the preset positioning point 33 in the vertical direction; values of αx, βx, αy, and βy are preset. The values of αx, βx, αy and, βy may be regulated in response to different conditions or requirements so as to fine tune the coordinates (Xp, Yp). In one embodiment, the values of αx and αy are “1”, and the values of βx and βy are “0”. In other words, the equations can be rewritten as followings:
Xp=(X−Lpm)*((Lpm+Lpc)/Lpc); and
Yp=(Y−Hpm)*((Lpm+Lpc)/Lpc).
[0022] In one embodiment, the image processing chip convert the first image into the second image with Perspective Transformation. Based on the difference value of shooting angle acquired by the abovementioned positioning point or the 3-axis accelerometer chip, the image processing chip can determine a perspective transformation matrix for converting the first image into the second image having a view angle of the second shooting angle. Whenever the photographic device is powered on, the image processing chip can generate a perspective transformation matrix based on the difference value between the first shooting angle and the second shooting angle, then, convert the first image acquired afterward into the second image having a view angle of the second shooting angle. Besides the abovementioned two methods converting the first image with a view angle of the first shooting angle into the second image with a view angle of the second shooting angle, other view-angle transformation technologies for images in the image processing field are also applicable to the present invention.
[0023] As expounded above, although the AI model of the photographic device in the present invention has not been train with the images captured at the first shooting angle, the photographic device can still accurately recognize the object in the first image captured at the first shooting angle. In other words, the photographic device in the present invention can perform AI object recognition to recognize the objects in the images captured at different shooting angles, and does not require training the photographic device with images captured at different shooting angles. Therefore, the time, image quantity, and cost for training AI model training will not increase.
[0024] As expounded above, the AI-based object recognition method in the present invention can be demonstrated with
Step S30: determining the difference value between a first shooting angle and a preset second shooting angle;
Step S31: when the difference value is greater than a preset value, converting the first image into a second image with a view angle of the second shooting angle; and
Step S32: providing the second image to an AI model for recognition.
[0025] The present invention has been described with the embodiments. However, these embodiments are only to exemplify the present invention but not to limit the scope of the present invention. Any equivalent modification or variation made by the persons skilled in the art according to the technical spirit of the present invention is to be also included by the scope of the present invention.