CN109035190B - Method for synthesizing automobile instrument dial background - Google Patents

Method for synthesizing automobile instrument dial background Download PDF

Info

Publication number
CN109035190B
CN109035190B CN201810852760.3A CN201810852760A CN109035190B CN 109035190 B CN109035190 B CN 109035190B CN 201810852760 A CN201810852760 A CN 201810852760A CN 109035190 B CN109035190 B CN 109035190B
Authority
CN
China
Prior art keywords
picture
background
difference
extracting
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810852760.3A
Other languages
Chinese (zh)
Other versions
CN109035190A (en
Inventor
邓宏平
林传文
程炳权
刘罡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Huishi Jintong Technology Co ltd
Original Assignee
Anhui Huishi Jintong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Huishi Jintong Technology Co ltd filed Critical Anhui Huishi Jintong Technology Co ltd
Priority to CN201810852760.3A priority Critical patent/CN109035190B/en
Publication of CN109035190A publication Critical patent/CN109035190A/en
Application granted granted Critical
Publication of CN109035190B publication Critical patent/CN109035190B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method for synthesizing a dial background of an automobile instrument, and relates to the technical field of automobile instruments. The method comprises S1, collecting n pictures of different states shot by an instrument at the same position of a camera; s2, judging whether n is less than 3, if not, executing S3, and if yes, executing S7; s3, selecting a first picture as a reference picture; s4, extracting difference parts of the reference picture and other n-1 pictures respectively to obtain a first difference part, a second difference part and a third difference part … (n-1) th difference part; s5, extracting common parts of the n-1 th differential part of the first differential part, the second differential part and the third differential part …, and recording the common parts as a first common part; and S6, extracting pixels corresponding to the first common part from any picture except the reference picture and replacing the pixels with the pixels at the corresponding positions of the reference picture one by one to obtain a first background picture. The background generated by fusing a plurality of instrument pictures greatly reduces interference information such as pointers and improves the detection efficiency.

Description

Method for synthesizing automobile instrument dial background
Technical Field
The invention belongs to the technical field of automobile instruments, and particularly relates to a method for synthesizing a background of an automobile instrument dial.
Background
In the era of intelligent automation, many enterprises are also continuously introducing automation equipment, including combination meter equipment. The combined instrument equipment is used for automatically detecting the instruments of automobiles and motorcycles and comprises a function of automatically acquiring pointers in the instruments. In the function of automatically acquiring the pointer in the meter, firstly, a background picture of the meter needs to be acquired, the current standard background picture of the meter is a normal picture of the meter selected at will, and the picture contains more pointers or other interference information and cannot be better applied to the function of automatically acquiring the pointer in the meter. If a background picture of the meter can be synthesized through data, a pointer in the meter can be accurately extracted.
How to synthesize a background picture of a meter through data is one of the problems to be solved urgently in the field.
Disclosure of Invention
In order to solve the problems in the background technology, the invention provides a method for synthesizing the background of a dial plate of an automobile instrument.
The invention is realized by the following technical scheme:
the invention relates to a method for synthesizing a background of a dial plate of an automobile instrument, which comprises the following steps of;
s1, collecting n pictures of different states shot by the instrument at the same position of the camera, wherein n is a natural number; the different state here means a case where the pointer is pointed at a different position or the scale is lighted up.
S2, judging whether n is less than 3, if not, executing S3, and if yes, executing S7;
s3, selecting a first picture as a reference picture;
s4, extracting difference parts of the reference picture and other n-1 pictures respectively to obtain a first difference part, a second difference part and a third difference part … (n-1) th difference part;
s5, extracting common parts of the n-1 th differential part of the first differential part, the second differential part and the third differential part …, and recording the common parts as a first common part;
s6, extracting pixels corresponding to the first common part from any picture except the reference picture and replacing the pixels with the corresponding positions of the reference picture one by one to obtain a first background picture; i.e. a background picture is generated by fusing the difference parts.
And S7, ending.
Further, the method also comprises S8, wherein S4-S6 are repeated by respectively selecting a second picture, a third picture and a fourth picture …, namely an nth picture as reference pictures to obtain a second background picture and a third background picture …, wherein the nth picture is a third background picture;
s9, selecting the first background picture as a reference background picture;
s10, extracting the difference between the reference background picture and the second background picture and the nth background picture of the third background picture …,
s11, extracting the common part of the difference part in the step S10, and recording the common part as a second common part;
and S12, extracting pixels corresponding to the second common part from any background picture except the reference background picture and replacing the pixels with the corresponding positions of the reference background picture one by one to obtain a final background picture.
Because the background picture obtained by single fusion cannot guarantee one hundred percent accuracy, the pixels in the picture replaced by the pixels may overlap with the reference picture, and a new difference region appears in the fusion result. In order to improve the accuracy of the background picture, single fusion background pictures are generated for multiple times by using different reference pictures, and then the extraction of the common part of multiple fusion results is completed by using the basic operation bitwise _ and method of the single background pictures, so that an instrument background picture with higher accuracy can be obtained.
Further, the obtaining of the difference portion in step S4 employs an Absdiff operation of OpenCv.
Further, the obtaining of the first common part in step S5 operates the bitwise _ and method by using the basis of the image.
Further, in the n pictures collected in step S1, the pointer positions of any two pictures are different.
The invention has the following beneficial effects:
the background generated by fusing a plurality of instrument pictures greatly reduces interference information such as pointers and improves the detection efficiency.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of the steps of a method for synthesizing a background of an instrument according to the present invention;
FIG. 2 is a diagram illustrating a first picture in accordance with embodiment 1;
FIG. 3 is a schematic view of a second picture in accordance with embodiment 1;
FIG. 4 is a schematic view of a third picture in example 1;
FIG. 5 is a schematic view of a first different portion in example 1;
FIG. 6 is a schematic view of a second different part in example 1;
FIG. 7 is a schematic view of a first common part in embodiment 1;
fig. 8 is a schematic diagram of a first background picture in embodiment 1.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 to 8, i in fig. 1 is an integer of 1 or more and n or less,
specific example 1:
taking 3 pictures as an example, that is, n is 3, the embodiment of the present invention includes the following steps,
s1, collecting 3 pictures of different pointing positions of a pointer, which are shot by a meter at the same position of a camera, and respectively recording the pictures as a first picture, a second picture and a third picture; in specific implementation, the cameras shoot at the same position, and the positions of the pointers are different during each shooting; the positions of the pointers in any two pictures are different, namely the positions of the pointers in any two pictures are the same except for the positions of the pointers in any two pictures.
Since the number of the collected pictures is 3 in this embodiment, the step S3 is directly executed without the determination in the step S2;
s3, selecting a first picture as a reference picture;
s4, extracting the difference part of the first picture and the second picture to obtain a first difference part; the obtained first difference part is a pointer on the first picture and a pointer on the second picture; a difference portion between the first picture and the third picture is extracted to obtain a second difference portion, where the second difference portion is a pointer on the first picture and a pointer on the third picture, as shown in fig. 5 and 6. When a first difference part and a second difference part are extracted, obtaining the difference parts in two groups of pictures through an Absdiff operation of OpenCv, wherein the principle is that the difference parts are obtained by calculating the absolute value of the difference part between pixels of parameter pictures, for example, the pixel of a certain point in a first picture is 1, and the pixel of the position in a second picture is 50, so that the difference value of the pixel of the corresponding position in the first picture and the second picture is 49; if the pixel values at the same point position are the same, the calculation result is 0, i.e., there is no difference.
S5, extracting a common part of the first difference part and the second difference part as a first common part, as shown in fig. 7. The first difference part is a pointer on the first picture and a pointer on the second picture, and the second difference part is a pointer on the first picture and a pointer on the third picture; therefore, a common part of the first difference portion and the second difference portion is a pointer portion on the first picture.
S6, then, the difference portions are fused to form a background, that is, pixels corresponding to the first common portion are extracted from any one of the second picture or the third picture and are replaced one by one to the corresponding position of the first picture, so as to obtain a first background picture. Since the pointer part on the second picture and the third picture is the background of the meter, the background of the meter is formed after the pointer part on the first picture is combined to the corresponding position of the first picture, and the whole background of the meter is formed, as shown in fig. 8.
S8, selecting the second and third pictures S4-S6 to obtain the second and third background pictures.
S9, selecting the first background picture as a reference background picture;
s10, extracting the difference parts of the reference background picture, the second background picture and the third background picture respectively;
s11, extracting the common part of the difference part in the step S10, and recording the common part as a second common part;
and S12, extracting pixels corresponding to the second common part from any background picture except the reference background picture and replacing the pixels with the corresponding positions of the reference background picture one by one to obtain a final background picture.
Referring to fig. 1, example 2: taking 6 pictures as an example, that is, n is 6, the embodiment of the present invention includes the following steps,
s1, collecting 6 pictures of different pointing positions of a pointer, which are shot by a meter at the same position of a camera, and respectively recording the pictures as a first picture, a second picture, a third picture, a fourth picture, a fifth picture and a sixth picture; in specific implementation, the cameras shoot at the same position, and the positions of the pointers are different during each shooting; the positions of the pointers in any two pictures of the obtained first picture, second picture, third picture, fourth picture, fifth picture and sixth picture are different, namely the positions of the pointers in any two pictures are the same except for the positions of the pointers.
Since the number of the collected pictures is 6 in this embodiment, the step S3 is directly executed without the determination in the step S2;
s3, selecting a first picture as a reference picture;
s4, extracting the difference part of the first picture and the second picture to obtain a first difference part; the obtained first difference part is a pointer on the first picture and a pointer on the second picture; extracting a difference part between the first picture and the third picture to obtain a second difference part, wherein the second difference part is a pointer on the first picture and a pointer on the third picture; extracting a difference part between the first picture and the fourth picture to obtain a third difference part, wherein the third difference part is a pointer on the first picture and a pointer on the fourth picture; extracting a difference part between the first picture and the fifth picture to obtain a fourth difference part, wherein the fourth difference part is a pointer on the first picture and a pointer on the fifth picture; and extracting a difference part between the first picture and the sixth picture to obtain a fifth difference part, wherein the fifth difference part is a pointer on the first picture and a pointer on the sixth picture. When a first difference part, a second difference part, a third difference part, a fourth difference part and a fifth difference part are extracted, the difference parts in two groups of pictures are obtained through an Absdiff operation of OpenCv, the principle is that the difference parts are obtained through calculating the absolute value of the difference parts between pixels of parameter pictures, for example, the pixel of a certain point in a first picture is 1, the pixel of the position in a second picture is 50, and then the difference value of the corresponding pixel of the position in the first picture and the second picture is 49; if the pixel values at the same point position are the same, the calculation result is 0, i.e., there is no difference.
S5, extracting common parts of the first difference part, the second difference part, the third difference part, the fourth difference part, and the fifth difference part as a first common part. Specifically, the first common portion may be obtained by the bitwise _ and method using the basis operation of the image. The first difference part is a pointer on the first picture and a pointer on the second picture, the second difference part is a pointer on the first picture and a pointer on the third picture, the third difference part is a pointer on the first picture and a pointer on the fourth picture, the fourth difference part is a pointer on the first picture and a pointer on the fifth picture, and the fifth difference part is a pointer on the first picture and a pointer on the sixth picture; therefore, a common part of the first difference portion, the second difference portion, the third difference portion, the fourth difference portion, and the fifth difference portion is a pointer portion on the first picture.
And S6, fusing the difference parts to form a background, namely extracting pixels corresponding to the first common part from any one of the second picture to the sixth picture to replace the pixels to the corresponding position of the first picture one by one to obtain a first background picture. The second picture, the third picture, the fourth picture, the fifth picture and the sixth picture are corresponding to the background of the instrument at the pointer part on the first picture, and the background of the whole instrument is formed after the background is synthesized at the corresponding position of the first picture.
In order to make the final background picture more accurate, the method also comprises the following steps: further comprising S8: respectively selecting a second picture, a third picture, a fourth picture, a fifth picture and a sixth picture as reference pictures to repeat S4-S6 to obtain a second background picture, a third background picture, a fourth background picture, a fifth background picture and a sixth background picture;
s9, selecting the first background picture as a reference background picture;
s10, respectively extracting differences between the reference background picture and the second background picture, and between the reference background picture and the third background picture … or the sixth background picture, specifically obtaining Absdiff operation using OpenCv.
S11, extracting the common part of the difference part in the step S10, and recording the common part as a second common part; in particular, it can be obtained by using the basic operation bitwise _ and method of the image.
And S12, extracting pixels corresponding to the second common part from any background picture except the reference background picture and replacing the pixels with the corresponding positions of the reference background picture one by one to obtain a final background picture.
In the present invention, n may be any integer of 4, 5 or more than 6.
The Absdiff operation of OpenCv and the bitwise _ and method of the basic operation of the image in the invention are all the prior art and are not described in detail.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (4)

1. A method for synthesizing a background of a dial plate of an automobile instrument is characterized by comprising the following steps;
s1, collecting n pictures of different states shot by the instrument at the same position of the camera, wherein n is a natural number;
s2, judging whether n is less than 3, if not, executing S3, and if yes, executing S7;
s3, selecting a first picture as a reference picture;
s4, extracting difference parts of the reference picture and other n-1 pictures respectively to obtain a first difference part, a second difference part and a third difference part … (n-1) th difference part;
s5, extracting common parts of the n-1 th differential part of the first differential part, the second differential part and the third differential part …, and recording the common parts as a first common part;
s6, extracting pixels corresponding to the first common part from any picture except the reference picture and replacing the pixels with the corresponding positions of the reference picture one by one to obtain a first background picture;
s7, ending;
s8, selecting a second picture, a third picture and a fourth picture …, namely the nth picture as reference pictures, and repeating S4-S6 to obtain a second background picture and a third background picture …, wherein the nth picture is the nth picture;
s9, selecting the first background picture as a reference background picture;
s10, extracting differences between the reference background picture and the nth background picture of the second background picture and the third background picture …, respectively;
s11, extracting the common part of the difference part in the step S10, and recording the common part as a second common part;
and S12, extracting pixels corresponding to the second common part from any background picture except the reference background picture and replacing the pixels with the corresponding positions of the reference background picture one by one to obtain a final background picture.
2. The method for synthesizing the background of the dial plate of the automobile instrument as claimed in claim 1, wherein the obtaining of the difference part in step S4 adopts Absdiff operation of OpenCv.
3. The method for synthesizing a background on a dial of an automobile meter as set forth in claim 1, wherein the obtaining of the first common part in step S5 is performed by a bitwise _ and method using a basis of an image.
4. The method for synthesizing the background of the dial plate of the automobile instrument as claimed in claim 1, wherein the pointer positions of any two of the n pictures collected in step S1 are different.
CN201810852760.3A 2018-07-30 2018-07-30 Method for synthesizing automobile instrument dial background Active CN109035190B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810852760.3A CN109035190B (en) 2018-07-30 2018-07-30 Method for synthesizing automobile instrument dial background

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810852760.3A CN109035190B (en) 2018-07-30 2018-07-30 Method for synthesizing automobile instrument dial background

Publications (2)

Publication Number Publication Date
CN109035190A CN109035190A (en) 2018-12-18
CN109035190B true CN109035190B (en) 2021-05-25

Family

ID=64647633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810852760.3A Active CN109035190B (en) 2018-07-30 2018-07-30 Method for synthesizing automobile instrument dial background

Country Status (1)

Country Link
CN (1) CN109035190B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854467A (en) * 2010-05-24 2010-10-06 北京航空航天大学 Method for adaptively detecting and eliminating shadow in video segmentation
CN102074022A (en) * 2011-01-10 2011-05-25 南京理工大学 Infrared image-based weak and small moving target detecting method
CN102821228A (en) * 2012-07-16 2012-12-12 西安电子科技大学 Low-rank video background reconstructing method
CN103795895A (en) * 2012-10-31 2014-05-14 京瓷办公信息系统株式会社 Image forming apparatus and method
CN103988150A (en) * 2011-03-25 2014-08-13 奥布隆工业有限公司 Fast fingertip detection for initializing vision-based hand tracker
CN108257157A (en) * 2018-02-09 2018-07-06 西安电子科技大学 One kind is based on Lab color spaces and the improved moving target detecting methods of ViBe

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3246874B1 (en) * 2016-05-16 2018-03-14 Axis AB Method and apparatus for updating a background model used for background subtraction of an image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854467A (en) * 2010-05-24 2010-10-06 北京航空航天大学 Method for adaptively detecting and eliminating shadow in video segmentation
CN102074022A (en) * 2011-01-10 2011-05-25 南京理工大学 Infrared image-based weak and small moving target detecting method
CN103988150A (en) * 2011-03-25 2014-08-13 奥布隆工业有限公司 Fast fingertip detection for initializing vision-based hand tracker
CN102821228A (en) * 2012-07-16 2012-12-12 西安电子科技大学 Low-rank video background reconstructing method
CN103795895A (en) * 2012-10-31 2014-05-14 京瓷办公信息系统株式会社 Image forming apparatus and method
CN108257157A (en) * 2018-02-09 2018-07-06 西安电子科技大学 One kind is based on Lab color spaces and the improved moving target detecting methods of ViBe

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智能交通中车辆检测与跟踪技术的研究;张淼;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20080815;30-31 *

Also Published As

Publication number Publication date
CN109035190A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN106548169B (en) Fuzzy literal Enhancement Method and device based on deep neural network
CN106875437B (en) RGBD three-dimensional reconstruction-oriented key frame extraction method
CN102842128B (en) Method for checking object and device thereof
CN104504744B (en) A kind of true method and device of plan for synthesizing license plate image
CN105049718A (en) Image processing method and terminal
CN109919007B (en) Method for generating infrared image annotation information
JP2018017570A (en) Rock mass strength determination device, rock mass strength determination method, and rock mass strength determination program
CN112215255A (en) Training method of target detection model, target detection method and terminal equipment
CN110517209B (en) Data processing method, device, system and computer readable storage medium
CN109145678A (en) Signal lamp detection method and device and computer equipment and readable storage medium storing program for executing
CN114494388B (en) Three-dimensional image reconstruction method, device, equipment and medium in large-view-field environment
CN115376109B (en) Obstacle detection method, obstacle detection device, and storage medium
CN112330709A (en) Foreground image extraction method and device, readable storage medium and terminal equipment
CN104243815A (en) Focusing method and electronic equipment
CN114638869A (en) Method and device for acquiring depth image, depth system, terminal and storage medium
CN115409814A (en) Photovoltaic module hot spot detection method and system based on fusion image
CN106683074B (en) A kind of distorted image detection method based on haze characteristic
CN105787464A (en) A viewpoint calibration method of a large number of pictures in a three-dimensional scene
CN108108293A (en) A kind of method and system for testing hangover time
CN109035190B (en) Method for synthesizing automobile instrument dial background
JP2015197851A (en) Image processor, program for image processing and information management system
CN107392948B (en) Image registration method of amplitude-division real-time polarization imaging system
CN101894369A (en) Real-time method for computing focal length of camera from image sequence
CN115578260B (en) Attention method and system for directional decoupling of image super-resolution
CN109166081B (en) Method for adjusting target brightness in video visibility detection process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 230000 Yafu Park, Juchao Economic Development Zone, Chaohu City, Hefei City, Anhui Province

Applicant after: ANHUI HUISHI JINTONG TECHNOLOGY Co.,Ltd.

Address before: 230000 Room 102, 1st Floor, C District, Science Park, Hefei National University, 602 Huangshan Road, Hefei High-tech Zone, Anhui Province

Applicant before: ANHUI HUISHI JINTONG TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant