CN110825468A - Method and device for realizing analog clock - Google Patents

Method and device for realizing analog clock Download PDF

Info

Publication number
CN110825468A
CN110825468A CN201910883093.XA CN201910883093A CN110825468A CN 110825468 A CN110825468 A CN 110825468A CN 201910883093 A CN201910883093 A CN 201910883093A CN 110825468 A CN110825468 A CN 110825468A
Authority
CN
China
Prior art keywords
analog clock
pointer
rotation angle
target rotation
reg
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.)
Withdrawn
Application number
CN201910883093.XA
Other languages
Chinese (zh)
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.)
Sheng Microelectronics (suzhou) Co Ltd
Original Assignee
Sheng Microelectronics (suzhou) 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 Sheng Microelectronics (suzhou) Co Ltd filed Critical Sheng Microelectronics (suzhou) Co Ltd
Priority to CN201910883093.XA priority Critical patent/CN110825468A/en
Publication of CN110825468A publication Critical patent/CN110825468A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The invention discloses a method for realizing an analog clock, which comprises the following steps of obtaining time, minute and second information of the current time, calculating a target rotation angle α of an analog clock pointer, obtaining the positions of a current pixel point and a central point of the analog clock pointer, and calculating the coordinate (x) of the current pixel point by using an iterative method0,y0) Rotating the coordinate (x, y) of α by the target rotation angle, configuring the shape of the pointer of the analog clock, judging whether the coordinate (x, y) after rotating α is in the pointer area of the analog clock to obtain a coefficient k, and comparing the pixel value of the current point with the color set value (R) of the pointerreg,Greg,Breg) The weighted average is used as the output pixel value with a coefficient k. The invention also relates to a device for realizing the analog clock. Method and device for implementing analog clock of the inventionThe method has the following beneficial effects: the method can greatly reduce the calculation complexity, can flexibly set the shape or size of the analog clock pointer, and can greatly reduce the power consumption and the cost of the image chip while ensuring the precision.

Description

Method and device for realizing analog clock
Technical Field
The present invention relates to the field of image processing, and in particular, to a method and an apparatus for implementing an analog clock.
Background
With the development of display technology and the intellectualization and multifunctionalization of display devices such as mobile phones, televisions, digital display screens and the like, the display function of the analog clock is more and more widely applied to the devices. The traditional analog clock display method needs to rotate a pointer picture by a fixed angle and superpose the pointer picture on a dial picture to display real-time. Firstly, the conventional technical scheme needs to store pointer pictures, which consumes a certain storage space additionally; secondly, when the pointer rotates, table lookup and rotation of a fixed angle are usually performed according to the current time (for example, the second hand can only search a coordinate transformation relation of rotation of 6 degrees, 12 degrees and 18 degrees), and the pointer rotation mode is single due to the limited number of stored tables, so that the smooth and transition effect of pointer rotation cannot be realized; finally, the traditional analog clock display method is complex in operation and high in hardware implementation difficulty.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an analog clock implementation method and apparatus that can greatly reduce the computational complexity, flexibly set the shape or size of the analog clock pointer, and greatly reduce the power consumption and cost of the image chip while ensuring the accuracy, in view of the above-mentioned defects in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: an implementation method for constructing an analog clock comprises the following steps:
A) acquiring time, minute and second information of the current time;
B) calculating target rotation angle α of analog clock hands, executing step C), wherein the analog clock hands are hour hands, minute hands or second hands;
b') obtaining the current pixel point and the position of the analog clock pointer central point, and executing the step C);
C) calculating the coordinates (x) of the current pixel point by using an iterative method0,y0) Coordinates (x, y) after rotating the target rotation angle α, x0Is the abscissa, y, of the current pixel point0The ordinate is the ordinate of the current pixel point, x is the abscissa of the current pixel point after being rotated by the target rotation angle α, and y is the ordinate of the current pixel point after being rotated by the target rotation angle α;
D) configuring the shape of the analog clock pointer, and judging whether the coordinate (x, y) rotated by the target rotation angle α falls in a framed analog clock pointer area to obtain a coefficient k;
E) the current point pixel value and the pointer color setting value (R)reg,Greg,Breg) Using a coefficient k to weight the average as an output pixel value; rregFor setting the red component of the pointer colour, GregFor the green component of the pointer colour setting, BregThe blue component of the pointer color setting value.
In the method for implementing the analog clock, if the initial angle corresponding to the 0 scale of the pointer of the analog clock is α0And the corresponding rotated angle of the N scale is α0+ v × N, v is the angular velocity of the analog clock pointer, and for any pixel point, if it passes through- (α)0+ v × N) angle rotation falls within the framed analog clock pointer area, indicating that the pixel belongs to the display area of the current time pointer, and recording α ═ - (α)0+v*N),N≥0。
In the method for implementing an analog clock according to the present invention, the step B') further includes:
b1') obtaining the coordinates (i, j) of the current pixel point in the whole image; i is the abscissa of the current pixel point in the whole image, and j is the ordinate of the current pixel point in the whole image;
b2') according to the coordinates (i) of the set analog clock pointer center pointc,jc) Calculating the coordinate (i-i) of the current pixel point relative to the pointer center point of the analog clockc,j-jc);icIs an abscissa of the centre point of the hands of an analog clock, jcIs the ordinate of the centre point of the pointer of the analog clock.
In the method for implementing an analog clock according to the present invention, the step C) further includes:
C1) judging the range of the target rotation angle α, and if the range exceeds the range of 0-360 degrees, directly converting the range to 0-360 degrees;
C2) converting the target rotation angle α to 0-90 degrees according to the range of the target rotation angle α;
C3) the target rotation angle α is calculated using an iterative method.
In the method for implementing the analog clock, in the step C2), the target rotation angle α is determined, and if the target rotation angle is in the range of 0 to 90 degrees, no conversion is required, if the target rotation angle is in the range of 90 to 180 degrees, x-y, y-x, α - α -90, if the target rotation angle is in the range of 180 to 270 degrees, x-x, y-y, α - α -180, and if the target rotation angle is in the range of 270 to 360 degrees, x-y, y-x, α - α -270.
In the method for implementing the analog clock of the present invention, in the step C3), the current pixel coordinates (x) are obtained0,y0) The coordinate after n times of rotation is (x)n,yn) Then (x)n,yn) Is prepared from (x)n-1,yn-1) The method is obtained by the following operations:
xn=xn-1*cosθn-yn-1*sinθn
yn=yn-1*cosθn+xn-1*sinθn
wherein, thetanPositive and negative of (D) are determined by target rotation angle α
Figure BDA0002206472950000031
Is obtained in the magnitude relation of, and thetanSatisfies the value of | theta1|>|θ2|>...>|θnAnd obtaining the coordinates of the target rotation angle α through table lookup and addition and subtraction shift operations.
In the method for implementing the analog clock, if the coordinate (x, y) of the current pixel rotated by the target rotation angle α falls in the framed analog clock pointer region, the coefficient k is equal to 1, and if the coordinate (x, y) of the current pixel rotated by the target rotation angle α does not fall in the framed analog clock pointer region, the coefficient k is equal to 0.
In the method for implementing the analog clock of the present invention, each pixel point of the input picture is traversed in all the regions where the analog clock pointer will appear, and the pixel value (R) is usedin,Gin,Bin) And a pointer color set value (R)reg,Greg,Breg) The following operations are carried out to obtain an output pixel value:
Rout=Rin*(1-k)+Rreg*k
Gout=Gin*(1-k)+Greg*k
Bout=Bin*(1-k)+Breg*k
wherein R isout、GoutAnd BoutRespectively a red component, a green component and a blue component of the output pixel value.
The invention also relates to a device for realizing the analog clock, which comprises:
an angle calculation unit: calculating a target rotation angle required to rotate correspondingly according to the input current time, and sending the target rotation angle to a coordinate rotating unit;
a coordinate rotation unit: calculating the rotated coordinates according to the coordinates of the current pixel point, the coordinates of the central point and the target rotation angle, and sending the coordinates to a weight calculation unit;
a weight calculation unit: calculating a proportion coefficient output by the current pixel point according to the rotated coordinates and the relative position of the pointer frame selection, and sending the proportion coefficient to a weighting calculation unit;
a weighting calculation unit: and calculating and outputting the input data according to the weighting coefficient sent by the weight calculating unit.
The implementation method and the device for the analog clock have the advantages that time, minute and second information of the current time is obtained, the target rotation angle α of the pointer of the analog clock is calculated, the positions of the current pixel point and the central point of the pointer of the analog clock are obtained, and the coordinate (x) of the current pixel point is calculated by using an iterative method0,y0) The coordinate (x, y) after the target rotation angle α is arranged to the shape of the pointer of the analog clock, and whether the coordinate (x, y) after the target rotation angle α is in the framed pointer area of the analog clock is judged to obtain a coefficient k, and the pixel value of the current point and the color setting value (R) of the pointer are comparedreg,Greg,Breg) Using a coefficient k weighted average as the output imageThe prime value; the invention uses the iterative method to calculate the clock position after rotation to realize the analog clock, can obtain the coverage area of the analog clock pointer after rotating by any angle, and the precision can reach 0.05 degrees.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for implementing an analog clock according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of the embodiment for obtaining the current pixel point and the position of the pointer center point of the analog clock;
FIG. 3 is a specific flowchart illustrating the process of calculating the coordinates of the current pixel point after rotating the target rotation angle by using the iterative method in the embodiment;
FIG. 4 is a diagram showing a first shape of the hands of the analog clock in the embodiment;
FIG. 5 is a diagram showing a second shape of the hands of the analog clock in the embodiment;
FIG. 6 is a diagram showing a third shape of the hands of the analog clock in the embodiment;
FIG. 7 is a schematic view of the structure of the apparatus in the embodiment;
FIG. 8 is a diagram of an analog clock in the embodiment.
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.
In the embodiment of the method and the device for implementing the analog clock of the present invention, a flowchart of the method for implementing the analog clock is shown in fig. 1. In fig. 1, the method for implementing the analog clock includes the following steps:
step S01 acquires the hour, minute, and second information of the current time: in this step, the time, minute and second information of the current time is acquired. Among them, the hour hand display range [0,12), the minute hand display range [0,60), and the second hand display range [0, 60).
Step S02 calculating target rotation angle α of hands of analog clock, in this step, calculating target rotation angle α of hands of analog clock, dividing 360 degrees of dial of analog clock into 12 hours/60 minutes/60 seconds, if the initial angle corresponding to 0 scale (hour/minute/second) of hands of analog clock is α0Then the angle after rotation corresponding to the N scale (hour/minute/second) is α0+ v × N, v is the angular velocity of the analog clock pointer, if any pixel passes through- (α)0+ v × N) angle rotation falls within the framed analog clock pointer area, indicating that the pixel belongs to the display area of the current time pointer, and recording α ═ - (α)0+ v N), N is not less than 0. The hands of the analog clock are the hour hand, minute hand or second hand, and v of the hour hand, minute hand and second hand is 30rad/h (radian/hour), 6rad/m (radian/minute) and 6rad/s (radian/second), respectively. After the present step is executed, step S03 is executed.
Step S02' obtains the position of the current pixel point and the analog clock pointer center point: in this step, the positions of the current pixel point and the analog clock pointer center point are obtained. After the present step is executed, step S03 is executed.
Step S03, calculating the coordinates (x) of the current pixel point by using an iterative method0,y0) Calculating the coordinates (x, y) of the current pixel point by using an iterative method in the step0,y0) Coordinates (x, y) after rotating the target by angle α, where x0Is the abscissa, y, of the current pixel point0The ordinate is the ordinate of the current pixel, x is the abscissa of the current pixel after rotating by the target rotation angle α, and y is the ordinate of the current pixel after rotating by the target rotation angle α.
Step S04 configures the shape of the hands of the analog clock, and determines whether the coordinates (x, y) after rotating the target rotation angle α fall within the framed area of the hands of the analog clock, and obtains the coefficient k. in this step, configures the shape of the hands of the analog clock (second hand, minute hand, or hour hand), and determines whether the coordinates (x, y) after rotating the target rotation angle α fall within the framed area of the hands of the analog clock, and obtains the coefficient k. specifically, if the coordinates (x, y) after rotating the target rotation angle α of the current pixel fall within the framed area of the hands of the analog clock, the coefficient k is 1, if the coordinates (x, y) after rotating the target rotation angle α of the current pixel do not fall within the framed area of the hands of the analog clock, the coefficient k is 0. wherein the shape of the hands of the analog clock (second hand, minute hand, or hour hand) may be a simple rectangle, or may support other more complex hand shapes, and the present invention may support customized hand shapes, and the third exemplary simulated hand shapes of the present embodiment are schematically illustrated in fig. 4, and fig. 6.
Step S05 compares the current point pixel value with the pointer color setting value (R)reg,Greg,Breg) Using a coefficient k weighted average as the output pixel value: in this step, the pixel value of the current point and the color setting value (R) of the pointer are calculatedreg,Greg,Breg) The coefficient k weighted average is used as the output pixel value, specifically, the pixel value (R) is used for traversing each pixel point of the input picture in all regions where analog clock pointers would appearin,Gin,Bin) And a pointer color set value (R)reg,Greg,Breg) The following operations are carried out to obtain an output pixel value:
Rout=Rin*(1-k)+Rreg*k
Gout=Gin*(1-k)+Greg*k
Bout=Bin*(1-k)+Breg*k
wherein R isregFor setting the red component of the pointer colour, GregFor the green component of the pointer colour setting, BregFor the blue component of the pointer colour setting value, Rout、GoutAnd BoutRespectively a red component, a green component and a blue component of the output pixel value.
The invention uses an iteration method to calculate the position of the rotated clock to realize the analog clock, can obtain the coverage area of the analog clock pointer after rotating by any angle, and has the precision of 0.05 degree. Compared with the method in the prior art, the method for realizing the analog clock can greatly reduce the calculation complexity, and only involves addition and subtraction and shift operation in the operation process. The method for realizing the analog clock can flexibly set the shape or the size of the hands (second hand, minute hand or hour hand) of the analog clock. The invention greatly reduces the power consumption and the cost of the image chip while ensuring the precision. The chip in the method for realizing the analog clock is simple to realize and does not need additional storage space.
For the present embodiment, the step S02' may be further refined, and the detailed flowchart is shown in fig. 2. In fig. 2, the step S02' further includes the following steps:
step S21' obtains the coordinates (i, j) of the current pixel point in the whole image: in the step, coordinates (i, j) of the current pixel point in the whole image are obtained; i is the abscissa of the current pixel point in the whole image, and j is the ordinate of the current pixel point in the whole image.
Step S22' according to the coordinate (i) of the set analog clock pointer center pointc,jc) Calculating the position of the current pixel point relative to the pointer center point of the analog clockLabel (i-i)c,j-jc): in this step, the coordinates (i) of the pointer center point of the analog clock are setc,jc) Calculating the coordinate (i-i) of the current pixel point relative to the pointer center point of the analog clockc,j-jc);icIs an abscissa of the centre point of the hands of an analog clock, jcIs the ordinate of the centre point of the pointer of the analog clock. Through steps S21 'to S22', the current pixel point and the position of the pointer center point of the analog clock are obtained.
For the present embodiment, the step S03 can be further refined, and the detailed flowchart is shown in fig. 3. In fig. 3, the step S03 further includes the following steps:
step S31, judging the range of the target rotation angle α, if the range exceeds 0-360 degrees, directly converting the range to 0-360 degrees, in the step, preprocessing the rotation angle to judge the range of the target rotation angle α, and if the range exceeds 0-360 degrees, directly converting the range to 0-360 degrees.
Step S32 is to convert the target rotation angle α to 0-90 degrees according to the range of the target rotation angle α, in the step, the range of the target rotation angle α is judged, if the target rotation angle is in the range of 0-90 degrees, the conversion is not needed, if the target rotation angle is in the range of 90-180 degrees, x is-y, y is x, α is α -90, if the target rotation angle is in the range of 180-270 degrees, x is-x, y is-y, α is α -180, and if the target rotation angle is in the range of 270-360 degrees, x is y, y is-x, α is α -270.
Step S33, calculating a target rotation angle α by using an iterative method, wherein in the step, specifically, the current pixel point coordinate (x)0,y0) The coordinate after n times of rotation is (x)n,yn) Then (x)n,yn) Is prepared from (x)n-1,yn-1) The method is obtained by the following operations:
xn=xn-1*cosθn-yn-1*sinθn
yn=yn-1*cosθn+xn-1*sinθn
wherein (x)0,y0) Is also the initial coordinate, theta, of the current pixel pointnPositive and negative of (2) are rotated by the targetAngle α and
Figure BDA0002206472950000081
is obtained in the magnitude relation of, and thetanSatisfies the value of | theta1|>|θ2|>...>|θnL, by rational arrangement of thetanThe above formula can be converted into a calculation mode more suitable for circuit implementation, and the coordinates of the target rotation angle α can be obtained through simple table lookup and addition and subtraction shift operations.
The embodiment also relates to a device for implementing the analog clock, and a schematic structural diagram of the device is shown in fig. 7. In fig. 7, the analog clock implementation apparatus is an image processing apparatus, and includes an angle calculation unit 1, a coordinate rotation unit 2, a weight calculation unit 3, and a weight calculation unit 4; the angle calculating unit 1 calculates a target rotation angle required to rotate correspondingly according to the input current time, and sends the target rotation angle to the coordinate rotating unit 2; the coordinate rotation unit 2 calculates the rotated coordinates according to the coordinates of the current pixel point, the coordinates of the central point and the target rotation angle, and sends the coordinates to the weight calculation unit 3; the weight calculation unit 3 calculates a proportion coefficient output by the current pixel point according to the rotated coordinates and the relative position of the pointer frame selection, and sends the proportion coefficient to the weighting calculation unit 4; the weight calculation unit 4 calculates and outputs the input data based on the weight coefficient sent from the weight calculation unit 3. Fig. 8 is a schematic diagram showing the analog clock finally implemented.
In a word, the invention uses an iteration method to calculate the position of the rotated clock to realize the analog clock, can obtain the coverage area of the analog clock pointer after rotating by any angle, and the precision can reach 0.05 degree. Compared with the method in the traditional technology, the method can greatly reduce the calculation complexity, and only addition and subtraction and shift operation are involved in the operation process. The invention can flexibly set the shape or size of the hands (second hand, minute hand or hour hand) of the analog clock. The invention greatly reduces the power consumption and the cost of the image chip while ensuring the precision.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A method for realizing an analog clock is characterized by comprising the following steps:
A) acquiring time, minute and second information of the current time;
B) calculating target rotation angle α of analog clock hands, executing step C), wherein the analog clock hands are hour hands, minute hands or second hands;
b') obtaining the current pixel point and the position of the analog clock pointer central point, and executing the step C);
C) calculating the coordinates (x) of the current pixel point by using an iterative method0,y0) Coordinates (x, y) after rotating the target rotation angle α, x0Is the abscissa, y, of the current pixel point0The ordinate is the ordinate of the current pixel point, x is the abscissa of the current pixel point after being rotated by the target rotation angle α, and y is the ordinate of the current pixel point after being rotated by the target rotation angle α;
D) configuring the shape of the analog clock pointer, and judging whether the coordinate (x, y) rotated by the target rotation angle α falls in a framed analog clock pointer area to obtain a coefficient k;
E) the current point pixel value and the pointer color setting value (R)reg,Greg,Breg) Using a coefficient k to weight the average as an output pixel value; rregFor setting the red component of the pointer colour, GregFor the green component of the pointer colour setting, BregThe blue component of the pointer color setting value.
2. The method as claimed in claim 1, wherein if the 0 scale of the analog clock pointer corresponds to an initial angle of α0And the corresponding rotated angle of the N scale is α0+ v × N, v is the angular velocity of the analog clock pointer, and for any pixel point, if it passes through- (α)0+ v × N) angular rotation falls within the framed analog clock pointer region, indicating that the pixel point is locatedDisplay area belonging to the current time hand, note α ═ - (α)0+v*N),N≥0。
3. The method of claim 1, wherein the step B') further comprises:
b1') obtaining the coordinates (i, j) of the current pixel point in the whole image; i is the abscissa of the current pixel point in the whole image, and j is the ordinate of the current pixel point in the whole image;
b2') according to the coordinates (i) of the set analog clock pointer center pointc,jc) Calculating the coordinate (i-i) of the current pixel point relative to the pointer center point of the analog clockc,j-jc);icIs an abscissa of the centre point of the hands of an analog clock, jcIs the ordinate of the centre point of the pointer of the analog clock.
4. The method of claim 1, wherein step C) further comprises:
C1) judging the range of the target rotation angle α, and if the range exceeds the range of 0-360 degrees, directly converting the range to 0-360 degrees;
C2) converting the target rotation angle α to 0-90 degrees according to the range of the target rotation angle α;
C3) the target rotation angle α is calculated using an iterative method.
5. The method as claimed in claim 4, wherein in the step C2), the target rotation angle α is determined, and if the target rotation angle is in the range of 0-90 degrees, no conversion is required, if the target rotation angle is in the range of 90-180 degrees, x-y, y-x, α - α -90, if the target rotation angle is in the range of 180-270 degrees, x-x, y-y, α - α -180, and if the target rotation angle is in the range of 270-360 degrees, x-y, y-x, α - α -270.
6. The method of claim 4, wherein in said step C3), the current pixel coordinate (x) is set0,y0) The coordinate after n times of rotation is (x)n,yn) Then (x)n,yn) Is prepared from (x)n-1,yn-1) The method is obtained by the following operations:
xn=xn-1*cosθn-yn-1*sinθn
yn=yn-1*cosθn+xn-1*sinθn
wherein, thetanPositive and negative of (D) are determined by target rotation angle α
Figure FDA0002206472940000021
Is obtained in the magnitude relation of, and thetanSatisfies the value of | theta1|>|θ2|>...>|θnAnd obtaining the coordinates of the target rotation angle α through table lookup and addition and subtraction shift operations.
7. The method of claim 1, wherein the coefficient k is 1 if the coordinate (x, y) of the current pixel rotated by the target rotation angle α falls in the framed pointer region of the analog clock, and the coefficient k is 0 if the coordinate (x, y) of the current pixel rotated by the target rotation angle α does not fall in the framed pointer region of the analog clock.
8. The method of any one of claims 1 to 7, wherein the pixel value (R) is used to traverse each pixel point of the input picture in all areas where the analog clock pointer would appearin,Gin,Bin) And a pointer color set value (R)reg,Greg,Breg) The following operations are carried out to obtain an output pixel value:
Rout=Rin*(1-k)+Rreg*k
Gout=Gin*(1-k)+Greg*k
Bout=Bin*(1-k)+Breg*k
wherein R isout、GoutAnd BoutRespectively a red component, a green component and a blue component of the output pixel value.
9. An apparatus for implementing an analog clock, comprising:
an angle calculation unit: calculating a target rotation angle required to rotate correspondingly according to the input current time, and sending the target rotation angle to a coordinate rotating unit;
a coordinate rotation unit: calculating the rotated coordinates according to the coordinates of the current pixel point, the coordinates of the central point and the target rotation angle, and sending the coordinates to a weight calculation unit;
a weight calculation unit: calculating a proportion coefficient output by the current pixel point according to the rotated coordinates and the relative position of the pointer frame selection, and sending the proportion coefficient to a weighting calculation unit;
a weighting calculation unit: and calculating and outputting the input data according to the weighting coefficient sent by the weight calculating unit.
CN201910883093.XA 2019-09-18 2019-09-18 Method and device for realizing analog clock Withdrawn CN110825468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910883093.XA CN110825468A (en) 2019-09-18 2019-09-18 Method and device for realizing analog clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910883093.XA CN110825468A (en) 2019-09-18 2019-09-18 Method and device for realizing analog clock

Publications (1)

Publication Number Publication Date
CN110825468A true CN110825468A (en) 2020-02-21

Family

ID=69548036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910883093.XA Withdrawn CN110825468A (en) 2019-09-18 2019-09-18 Method and device for realizing analog clock

Country Status (1)

Country Link
CN (1) CN110825468A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768627A (en) * 2012-06-04 2012-11-07 北京百纳威尔科技有限公司 Analog watch hand implementation method and device and electronic equipment with analog clock
CN104765266A (en) * 2015-04-30 2015-07-08 西安诺瓦电子科技有限公司 Simulation clock display method and device and LED display control card
CN104820360A (en) * 2015-04-29 2015-08-05 惠州市德赛西威汽车电子有限公司 Analog clock display method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768627A (en) * 2012-06-04 2012-11-07 北京百纳威尔科技有限公司 Analog watch hand implementation method and device and electronic equipment with analog clock
CN104820360A (en) * 2015-04-29 2015-08-05 惠州市德赛西威汽车电子有限公司 Analog clock display method
CN104765266A (en) * 2015-04-30 2015-07-08 西安诺瓦电子科技有限公司 Simulation clock display method and device and LED display control card

Similar Documents

Publication Publication Date Title
US11823363B2 (en) Infrared and visible light fusion method
CN109688351B (en) Image signal processing method, device and equipment
WO2022012085A1 (en) Face image processing method and apparatus, storage medium, and electronic device
US11153506B2 (en) Application processor including multiple camera serial interfaces receiving image signals from multiple camera modules
CN109660782A (en) Reduce the veining IR pattern in stereo depth sensor imaging
CN107004255A (en) The non-local mean image denoising retained with details of mixing is driven using self-similarity
US11244651B2 (en) Color gamut matching method, device, display terminal and readable storage medium
CN109658337B (en) FPGA implementation method for real-time electronic despinning of images
CN110335330B (en) Image simulation generation method and system, deep learning algorithm training method and electronic equipment
WO2018045769A1 (en) Method and device for implementing tone variation animation on basis of attribute animation
CN111833243B (en) Data display method, mobile terminal and storage medium
CN110263918A (en) Method, apparatus, electronic equipment and the computer readable storage medium of training convolutional neural networks
CN107369132A (en) Obtain method, system and the terminal device of virtual reality device pattern distortion rule
CN113676713A (en) Image processing method, apparatus, device and medium
CN104820360B (en) Simulate clock display method
CN104641631B (en) By the color enhancement of gamut extension
CN108986769A (en) A method of showing that equipment maximizes reduction Rec.2020 colour gamut content lower than Rec.2020 colour gamut
CN110825468A (en) Method and device for realizing analog clock
CN111815714A (en) Fisheye camera calibration method and device, terminal device and storage medium
CN110298872A (en) A kind of method for registering of ultraviolet light camera and Visible Light Camera array
CN112308767B (en) Data display method and device, storage medium and electronic equipment
CN110288674A (en) A kind of method and system of abnormity smoothing processing
CN111292245A (en) Image processing method and device
CN111583139A (en) Blush adjusting method, blush adjusting device, electronic equipment and computer readable medium
Guan et al. Research on a novel imaging bionic polarization navigation sensor for glimmer environment application

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

Address after: Room 1905, building 4, No. 209, Zhuyuan Road, high tech Zone, Suzhou City, Jiangsu Province 215000

Applicant after: Sunrise Microelectronics (Suzhou) Co.,Ltd.

Address before: Room 1905, building 4, No. 209, Zhuyuan Road, high tech Zone, Suzhou City, Jiangsu Province 215000

Applicant before: Sheng Microelectronics (Suzhou) Co.,Ltd.

CB02 Change of applicant information
WW01 Invention patent application withdrawn after publication

Application publication date: 20200221

WW01 Invention patent application withdrawn after publication