CN111220836B - Picture storage method and system applied to oscilloscope - Google Patents

Picture storage method and system applied to oscilloscope Download PDF

Info

Publication number
CN111220836B
CN111220836B CN201911116192.1A CN201911116192A CN111220836B CN 111220836 B CN111220836 B CN 111220836B CN 201911116192 A CN201911116192 A CN 201911116192A CN 111220836 B CN111220836 B CN 111220836B
Authority
CN
China
Prior art keywords
rgb
code
rgb values
mutually exclusive
group
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
CN201911116192.1A
Other languages
Chinese (zh)
Other versions
CN111220836A (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.)
Youlide Technology Heyuan Co ltd
Original Assignee
Youlide Technology Heyuan 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 Youlide Technology Heyuan Co ltd filed Critical Youlide Technology Heyuan Co ltd
Priority to CN201911116192.1A priority Critical patent/CN111220836B/en
Publication of CN111220836A publication Critical patent/CN111220836A/en
Application granted granted Critical
Publication of CN111220836B publication Critical patent/CN111220836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R13/00Arrangements for displaying electric variables or waveforms
    • G01R13/02Arrangements for displaying electric variables or waveforms for displaying measured electric variables in digital form
    • G01R13/0209Arrangements for displaying electric variables or waveforms for displaying measured electric variables in digital form in numerical form

Abstract

The invention provides a picture storage method applied to an oscilloscope, which comprises the following steps: acquiring RGB values of the picture; converting each of the RGB values to a first code; transmitting the first code; the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values. By utilizing the picture storage method, the RGB values corresponding to the three primary colors are not directly stored, but one code is used for representing one color, and the code is stored, so that the used colors are few, the needed codes are few, and the storage space requirement for storing the codes is also small. When the data is read out, the codes are converted into RGB values corresponding to three primary colors, and then the RGB values are displayed, namely the RGB values of each point of a digital storage oscilloscope picture are compressed during storage, so that the required storage space can be greatly reduced, and pins of the FPGA can be saved for an external storage device of the FPGA.

Description

Picture storage method and system applied to oscilloscope
Technical Field
The invention relates to the field of picture storage, in particular to a picture storage method and system applied to an oscilloscope.
Background
The digital storage oscilloscope is different from a common analog oscilloscope, converts an acquired analog voltage signal into a digital signal, and performs analysis, processing, storage, display or printing and other operations by an internal microcomputer, so that the digital storage oscilloscope can store waveform pictures for a long time. When the display data needs to be stored, the display data can be written into a memory; when the display is needed, the display is read from the memory.
At present, when a general digital storage oscilloscope stores a waveform picture, values corresponding to three primary colors are stored. Taking the RGB color mode shown in fig. 1 as an example, when storage is required, the writing module acquires RGB values and sends the RGB values to an external storage device for storage; when the display is needed, the read module reads the RGB value from the external memory and displays the RGB value on the LCD. When 16BPP (bits per pixel) is adopted, 65536 colors are contained, so that 16 bits of space are used for storing each point in an oscilloscope picture; when 24BPP (bits per pixel) is used, 16777216 colors are included, and therefore 24 bits of space are used for storage for each point in the oscilloscope picture.
The number of colors required by the picture of the general digital storage oscilloscope is limited, and only occupies ten and twenty levels of 24BPP color number, wherein a large number of colors are not required to be used, so that the storage mode is very wasted in storage space at present.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a picture storage method and system applied to an oscilloscope that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided a picture storing method applied to an oscilloscope, comprising:
acquiring RGB values of the picture;
converting each of the RGB values to a first code;
transmitting the first code;
the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values.
Preferably, the method further comprises:
receiving the first code;
and acquiring and displaying the corresponding RGB value according to the first code.
Preferably, after acquiring the RGB values of the picture, the method further includes:
judging whether the RGB value obtained at the current time is in a first mutually exclusive RGB group; the first mutually exclusive set of RGB includes: n different RGB values, and the current time only corresponds to one RGB value;
if so, storing the RGB value corresponding to the current time and sending a second code, wherein the second code is formed by converting the first mutually exclusive RGB group, and the bit number of the second code is equal to that of the first code.
Preferably, the method further comprises:
and if the RGB value obtained at the current time is not in a first mutually exclusive RGB group, converting the RGB value into a first code and sending the first code.
Preferably, the method further comprises:
receiving the second code;
and acquiring and displaying the RGB value corresponding to the current time according to the second code.
Preferably, after acquiring the RGB values of the picture, the method further includes:
judging whether the RGB value obtained at the current time is in any third mutually exclusive RGB group;
wherein, the N third mutually exclusive RGB groups all include: m RGB values, each RGB value is taken from any one RGB value in M second RGB groups respectively, and M RGB values in N third mutually exclusive RGB groups are different; m of the second RGB groups each include: n different RGB values, and the current time includes the N RGB values in the second RGB group at the same time;
if so, storing the second RGB group corresponding to the RGB value, and sending a third code, wherein the third code is formed by converting the RGB value at the current time; the N RGB values in the second RGB group correspond to the N third codes, and the N third codes corresponding to the N RGB values in each second RGB group are the same, and the number of bits of the third code is equal to the number of bits of the first code.
Preferably, the method further comprises:
receiving the third code;
and acquiring and displaying the RGB value corresponding to the current time according to the third code.
According to another aspect of the present invention, there is provided a picture storage system applied to an oscilloscope, comprising:
a first acquisition unit configured to acquire RGB values of the picture;
a first conversion unit for converting each of the RGB values into a first code;
a first transmitting unit configured to transmit the first code;
the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values.
Preferably, the system further comprises:
a first receiving unit, configured to receive the first code;
and the first processing unit is used for acquiring the corresponding RGB value according to the first code and displaying the RGB value through a display unit.
Preferably, the system further comprises:
the first judgment unit is used for judging whether the RGB value obtained at the current time is in a first mutually exclusive RGB group or not; the first mutually exclusive set of RGB includes: n different RGB values, and the current time only corresponds to one RGB value;
the device comprises a first storage unit, a second sending unit and a second conversion unit, wherein when the RGB values are located in a first mutually exclusive RGB group, the first storage unit is used for storing the RGB values corresponding to the current time, the second sending unit is used for sending a second code, and the second conversion unit is used for converting the first mutually exclusive RGB group into the second code.
When the picture storage method of the invention is used for storing the picture of the oscilloscope to be displayed, the RGB values corresponding to the three primary colors are not directly stored, but the code represents one color, the used color is less, and the required code number is less. When the data is read out, the codes are converted into RGB values corresponding to three primary colors, and then the RGB values are displayed, namely the RGB values of each point of a digital storage oscilloscope picture are compressed during storage, so that the required storage space can be reduced, and pins of the FPGA can be saved for an external storage device of the FPGA.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
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 schematic diagram of a prior art digital storage oscilloscope storing waveform pictures;
FIG. 2 is a flowchart illustrating a method for storing a frame according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for storing a frame according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for storing a frame according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a picture storage system according to an embodiment of the present invention.
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.
The embodiment of the invention provides a picture storage method, which is applied to an oscilloscope, and is particularly realized by an FPGA (field programmable gate array device). when the oscilloscope continuously refreshes the picture of a display screen, each point in the picture to be displayed needs to be stored, and then the stored point is continuously read back and transmitted to a relevant part of the display according to the requirements of the speed of the display screen and the like, wherein the storage and read-back process is the most suitable place for the method, and the flow schematic diagram of the picture storage method shown in figure 2 specifically refers to the following steps:
and step S101, acquiring the RGB value of the picture.
Wherein, the RGB value is the value of the RGB color pattern at a certain point in the oscilloscope picture, i.e. the components of the three primary colors of red, green and blue in the point are respectively represented by the value range of 0 to 255, it can uniquely represent a certain color, and usually a color needs to use the space of 8 bits, 16 bits, 24 bits or more to represent the RGB value.
Step S102, converting each of the RGB values into a first code.
Specifically, when the received RGB values are converted into the first code, the first code may be arranged in a custom manner. And the first codes corresponding to the same RGB values are the same, the first codes corresponding to different RGB values are different, and the number of bits of the first codes is less than that of the RGB values. Since the number of colors used for the oscilloscope picture is much lower than half of the total number of colors in the 8-bit, 16-bit, 24-bit RGB color modes, the fewer colors used, the fewer first codes are required. The number of bits of the first code may be completely smaller than the number of bits of the RGB values, i.e. the space occupied by the first code may be smaller than the space occupied by the RGB values. For example, taking 16BPP as an example, the colors used by an oscilloscope are generally not more than one hundred, and are much less than 65536/2 colors, so that for each point in a digital storage oscilloscope picture, a 16-bit RGB value can be converted into a 4-bit or even 3-bit first code and sent to a memory, so that the picture storage method according to the embodiment of the present invention can only use 4-bit or 3-bit space for storage, which is equivalent to compressing the original RGB values with a large number of bits into the first code with a smaller number of bits, and the space occupied by the first code is 1/4 or even less of the original scheme.
Step S103, the first code is sent.
And sending the first code to a storage unit for storage, so as to be convenient for reading in a read-back process and determining a corresponding RGB value. Preferably, the storage unit can be a RAM inside the FPGA chip, or an external storage device, and is stored by the RAM or the external storage device.
The method provided by the above embodiment of the present invention does not directly send and store the RGB value after acquiring the RGB value, but first converts the RGB value into the first code and then sends the first code, so that the storage space can be greatly saved, that is, the storage space of the required storage device is correspondingly reduced, thereby reducing the cost of the storage device. In addition, for a low-end oscilloscope, the screen resolution is low enough, and after the method is changed into the method, because the storage space is saved, the storage device externally connected with the FPGA chip can be saved, and the requirement of directly using the RAM in the PFGA chip can be met, so the cost is saved more. In the scheme of externally connecting the FPGA with the storage device, the pins of the FPGA can be saved, and the advantages of the invention are particularly obvious when the FPGA chip with few pins is selected. And the display effect is the same as before by adopting the method of the embodiment of the invention.
In the picture storing method provided in the embodiment of the present invention, when the first code needs to be read back, that is, when the saved oscilloscope picture is restored, the method further includes:
step S104, receiving the first code; specifically, when the first code is stored by directly using the RAM in the FPGA, the first code is directly received from the RAM and the next process is carried out; the first code needs to be received from an external storage device when the external storage device is used to store the first code.
And step S105, acquiring and displaying the corresponding RGB value according to the first code.
After the first code is obtained, since the color corresponding to the first code cannot be directly displayed, the RGB value corresponding to the first code needs to be obtained, and the display displays the color corresponding to the RGB value. Specifically, since the one-to-one correspondence between the RGB values and the first code is established in the previous conversion process, the corresponding RGB values can be directly obtained according to the received first code, and then the corresponding color is displayed.
In order to further reduce the storage space occupied in the picture storage process, another embodiment of the present invention further provides a picture storage method, which is mainly directed to colors related to some special parts in the picture like an oscilloscope picture. Specifically, taking the grid colors of the oscilloscope as an example, different grid colors are corresponding to different setting schemes, and the grid colors do not appear on the display screen of the oscilloscope at the same time, and most of the grid colors are different from the colors of other parts of the oscilloscope, which means that most of the grid colors only exist in one grid mode, and in addition, the grid colors do not appear in other positions, and the grid colors are mutually exclusive. For example, a white grid and a gray grid may only appear in different settings, respectively, and it is unlikely that these two colors will appear simultaneously in the display as grid colors. Therefore, when the above-mentioned mutually exclusive colors are encountered during the picture saving process, the picture storing method as shown in fig. 3 can be adopted.
Referring to fig. 3, a method for storing a picture according to another embodiment of the present invention includes:
step S201, acquiring RGB values of the picture;
step S202, judging whether the RGB value acquired at the current time is in a first mutually exclusive RGB group; the first mutually exclusive set of RGB includes: n different RGB values, and the current time only corresponds to one RGB value; specifically, colors corresponding to N mutually different RGB values in the first mutually exclusive RGB group are mutually exclusive, that is, only one color corresponding to an RGB value appears at the same time, and other RGB values in the first mutually exclusive RGB group do not appear in the picture at the same time.
Step S203, if the RGB value is in a first mutually exclusive RGB group, storing the RGB value corresponding to the current time and sending a second code, where the second code is converted from the first mutually exclusive RGB group, and the number of bits of the second code is equal to the number of bits of the first code, specifically, when it is determined that the obtained RGB value is in the first RGB group, a color corresponding to the RGB value representing the current time and colors corresponding to other RGB values in the first mutually exclusive RGB group do not appear in a picture of the oscilloscope at a certain time at the same time, at this time, the RGB value corresponding to the current time needs to be stored by a register of the FPGA, so as to determine which mutually exclusive RGB value corresponds to the time in the first RGB group in the read-back process. More importantly, because the RGB value is located in the first mutually exclusive RGB group, and it is known that the RGB value corresponds to the current time, and other RGB values in the first mutually exclusive RGB group are unlikely to appear at the current time, it is no longer necessary to perform code conversion on each RGB value in the first mutually exclusive RGB group, and only the first mutually exclusive RGB group is entirely converted into the second code, that is, the second code is a code representing all RGB values in the first mutually exclusive RGB group.
In the image storage method provided in the embodiment of the present invention, preferably, referring to fig. 3, the method further includes:
step S204, if the RGB value obtained at the current time is not in the first mutually exclusive RGB group, converting the RGB value into a first code, and sending the first code. Specifically, if the RGB value is not in the first mutually exclusive RGB group, which means that the RGB value may appear simultaneously with other RGB values in the first mutually exclusive RGB group, or appears at other positions of the oscilloscope picture, the RGB value cannot be regarded as a mutually exclusive color, and the same code cannot be used to represent different RGB values, so that the RGB value still needs to be converted into a first code separately.
In particular to the oscilloscope grid color embodiment, since the grid color is different colors, i.e., different RGB values, at different settings, but most of the colors do not appear simultaneously, i.e., the colors are mutually exclusive, a second code is used to represent the grid color, and a register is used to record which color is selected by the current grid. The FPGA also has two modes for determining the current grid color, one mode is directly sent by a signal processing unit arranged by an oscilloscope, the other mode is judged by the acquired RGB value, and when the grid color appears in the acquired color, the selection of the current grid color can be determined. It is noted that in the embodiment of the present invention, if one of the grid colors is used in more than one grid, the color needs to be used solely by a first code, and the other grid colors use a second code in common, that is, only mutually exclusive colors can be used as a group by a second code, where mutually exclusive means that two colors cannot appear on the oscilloscope picture at the same time. Those skilled in the art will appreciate that, in addition to grid colors, such mutually exclusive color sets within an oscilloscope may be processed using the methods described in embodiments of the present invention, which are not limited to processing oscilloscope grid color selections. By adopting the method of the embodiment, codes can be further reduced, so that the storage space is reduced.
Further, when the saved oscilloscope picture needs to be restored, the method provided by the embodiment of the invention further comprises the following steps:
step S205, receiving the second code;
and step S206, acquiring the RGB value corresponding to the current time according to the second code and displaying the RGB value. Since the second code contains all mutually exclusive colors, that is, all RGB values, the corresponding RGB values cannot be directly obtained from the second code and displayed, and the register and the second code need to be combined to search for the RGB value corresponding to the current time in the register.
Preferably, as shown in fig. 3, the image storage method according to the embodiment of the present invention further includes the following steps:
step S207, receiving the first code;
in a preceding step, when the RGB values are not in a first mutually exclusive RGB set, the RGB values are converted to a first code. Therefore, when the saved oscilloscope picture needs to be restored, the first code continues to be received.
And S208, acquiring and displaying the corresponding RGB value according to the first code. This step is similar to the related steps of the previous embodiments and will not be described herein again. Specifically, if the received code is the first code for the individual color, that is, does not belong to the first mutually exclusive RGB group, the corresponding color is displayed directly according to the individual RGB value corresponding to the first code.
In another scenario, when a plurality of color groups form a mutual exclusion relationship, an embodiment of the present invention further provides another image storage method, in this embodiment, a second RGB group is used to describe a group of color groups, each group of the second RGB group includes N different RGB values, that is, a group of color groups includes a plurality of colors, and a plurality of second RGB groups, that is, colors corresponding to mutually exclusive RGB values of different groups do not appear on the same image, as shown in fig. 4, the method further includes:
step S301, acquiring RGB values of the picture;
step S302, judging whether the RGB value acquired at the current time is in any third mutually exclusive RGB group;
wherein, the N third mutually exclusive RGB groups all include: m RGB values, each RGB value is taken from any one RGB value in M second RGB groups respectively, and M RGB values in N third mutually exclusive RGB groups are different; m of the second RGB groups each include: the current time comprises the N different RGB values in the second RGB group at the same time.
In the solution discussed in this embodiment, the multiple groups of mutually different color groups are taken as the basis, that is, a single group of the M groups of second RGB groups is taken as the display solution, which means that all RGB values in one group of second RGB groups appear at the same time in the same time, that is, all RGB values in one group of second RGB groups appear at the same time but different. But all elements within the M second RGB group are different. In other words, the M × N RGB values are all different. Specifically, a set of corresponding second RGB sets only appears at the current time, so the purpose of this step is to obtain any one RGB value in the second RGB set for subsequent judgment.
Specifically, the third mutually exclusive RGB group is constructed by: and randomly selecting an RGB value from each second RGB group, so that M second RGB groups can select M RGB values. Combining the M RGB values forms a third mutually exclusive RGB set. By analogy, each group of second RGB groups includes N RGB values, so that N groups of mutually different third mutually exclusive RGB groups can be formed. After the third mutually exclusive RGB group is constructed, the determination method according to the embodiment of the present invention is as follows: and sequentially comparing the RGB value acquired at the current time with the M RGB values in any one third mutually exclusive RGB group to determine whether the RGB values are the same.
Step S303, if the RGB values are the same, storing the second RGB group corresponding to the RGB value, and sending a third code, wherein the third code is formed by converting the RGB value of the current time; the N RGB values in the second RGB group correspond to the N third codes, and the N third codes corresponding to the N RGB values in each second RGB group are the same, and the number of bits of the third code is equal to the number of bits of the first code. For example, when an RGB value is compared with M RGB values in the first and third mutually exclusive RGB groups, respectively; when the RGB value is the same as the Q-th RGB value, the FPGA internal register stores the second RGB group from which the RGB value comes, and a third code is sent at the same time. The third code is converted from the RGB values in the second RGB set.
Specifically, the third code and each RGB value in the second RGB group are in a one-to-one correspondence relationship, that is, N RGB values may be converted into N third codes; but the same third code also constitutes a one-to-one correspondence with each RGB value in the other set of second RGB sets. That is, the N RGB values in each second RGB group are converted into the same N third codes, that is, the N third codes corresponding to each second RGB group are the same. Therefore, instead of using M × N codes to represent M × N different RGB values, the storage space can be further reduced.
In a preferred embodiment of the present invention, when the obtained RGB values are not located in the first group of third mutually exclusive RGB groups, that is, the obtained RGB values are different from all the three RGB values in the first group of third mutually exclusive RGB groups, the register does not perform any action, and then the register respectively compares the obtained RGB values with the second group of third mutually exclusive RGB groups until the same RGB values are found, and stores the second RGB group corresponding to the RGB values. In another preferred embodiment of the present invention, as shown in step S304, if the RGB values are not in all the third mutually exclusive RGB groups, it means that the color corresponding to the RGB values is not in the second RGB group, and then the RGB values need to be converted into a first code separately. The detailed method is the same as above, and is not described herein again.
The picture storage method provided by the embodiment of the invention further comprises the following steps:
step S305, receiving the third code;
and step S306, acquiring and displaying the RGB value corresponding to the current time according to the third code.
Specifically, since the third code represents an RGB value in a set of second RGB sets, it cannot be directly known which set of second RGB sets is. Therefore, a register and a third code need to be combined. Since it is necessary to store in the register which second RGB set is selected when the current time is the current time, the register first determines the second RGB set corresponding to the current time, that is, it can determine which RGB value corresponds to the third code, and displays the corresponding color.
In a specific embodiment of the present invention, the oscilloscope menu background color scheme is taken as an example to adaptively explain the above-mentioned process, but the scope of the implementation of the present invention is not limited thereto. Suppose the oscilloscope includes M menu background color schemes in total, i.e. there are M second RGB groups in total, and each menu background color scheme is composed of N different colors, i.e. each second RGB group includes N RGB values. Then the M menu background color schemes contain M × N colors, i.e., M × N RGB values. Secondly, N third codes are adopted to represent all colors in the current menu ground color scheme, and the N third codes are adopted to represent different N RGB values in different menu ground color schemes. That is, a total of N third codes are used to represent M × N colors. Secondly, one color is selected from each menu ground color scheme, M colors can be naturally selected from the M menu ground color schemes, the M colors form a group of third mutually exclusive RGB groups, then one color can form N groups of third mutually exclusive RGB groups, and M RGB values in each group of third mutually exclusive RGB groups are different.
When the color acquired at the current time needs to be judged to be in which menu base color scheme, namely the RGB value corresponding to the color is in which second RGB group, the comparison judgment is carried out with the M RGB values in the third mutually exclusive RGB groups, if the pairing is successful, namely the RGB value is one of the RGB values in one of the third mutually exclusive RGB groups, then the register in the FPGA is used for storing that the current menu base color scheme is the scheme corresponding to the color, namely the scheme corresponds to the only second RGB group. If not, judging whether the RGB value is equal to the next RGB value or not, and further sequentially judging for M times. And when the judgment results of the M times are negative, the register does not perform any storage action, and the process of judging the RGB values in the third mutually exclusive RGB group of the next group is entered. Of course, since it is uncertain whether the under color scheme has been changed, the above determination and change are still performed on the RGB values acquired next time.
An embodiment of the present invention further provides a picture storage system, as shown in fig. 5, applied to an oscilloscope, including:
a first acquiring unit 401, configured to acquire RGB values of the picture;
a first conversion unit 402 for converting each of the RGB values into a first code;
a first sending unit 403, configured to send the first code;
the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values.
In a preferred embodiment, the system further comprises:
a first receiving unit, configured to receive the first code;
and the first processing unit is used for acquiring the corresponding RGB value according to the first code and displaying the RGB value through a display unit.
The image storage system provided by the embodiment of the invention further comprises:
the first judgment unit is used for judging whether the RGB value acquired at the current time is in a first mutually exclusive RGB group; the first mutually exclusive set of RGB includes: n different RGB values, and the Nth time only corresponds to one RGB value;
the device comprises a first storage unit, a second sending unit and a second conversion unit, wherein when the RGB values are located in a first mutually exclusive RGB group, the first storage unit is used for storing the RGB values corresponding to the current time, the second sending unit is used for sending a second code, and the second conversion unit is used for converting the first mutually exclusive RGB group into the second code.
Preferably, the method further comprises the following steps: a second receiving unit, configured to receive the second code.
And the second processing unit is used for acquiring the RGB value corresponding to the current time according to the second code and displaying the RGB value through the display unit.
The image storage system provided by the embodiment of the invention further comprises:
and the second judging unit is used for judging whether the RGB value acquired at the current time is positioned in any third mutually exclusive RGB group. Wherein, the N third mutually exclusive RGB groups all include: m RGB values, each RGB value is taken from any one RGB value in M second RGB groups respectively, and M RGB values in N third mutually exclusive RGB groups are different; m of the second RGB groups each include: n mutually different RGB values, and the current time all contains N RGB values simultaneously.
The device comprises a second storage unit, a third sending unit and a third conversion unit, wherein when the RGB values are located in N third mutually exclusive RGB groups, the second storage unit is used for storing the second RGB group corresponding to the RGB values, the third sending unit is used for sending a third code, and the third conversion unit is used for converting the RGB values at the current time into a third code. The N RGB values in the second RGB group correspond to the N third codes, and the N third codes corresponding to the N RGB values in each second RGB group are the same.
Preferably, the method further comprises the following steps: a third receiving unit, configured to receive the third code.
And the third processing unit is used for acquiring the RGB value corresponding to the current time according to the third code and displaying the RGB value through the display unit.
In summary, the image storage method or system of the present invention does not directly store the RGB values corresponding to the three primary colors, but uses the codes to represent one color, and stores the codes, so that the used colors are few, and the required code numbers are also few. When the data is read out, the codes are converted into RGB values corresponding to three primary colors, and then the RGB values are displayed, namely the RGB values of each point of a digital storage oscilloscope picture are compressed during storage, so that the required storage space can be reduced, and pins of the FPGA can be saved for an external storage device of the FPGA.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should also be understood that, in the embodiment of the present invention, the term "and/or" is only one kind of association relation describing an associated object, and means that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A picture storage method applied to an oscilloscope is characterized by comprising the following steps:
acquiring RGB values of the picture;
judging whether the RGB value obtained at the current time is in a first mutually exclusive RGB group; the first mutually exclusive set of RGB includes: n different RGB values, and the current time only corresponds to one RGB value;
if so, storing the RGB value corresponding to the current time and sending a second code, wherein the second code is formed by converting the first mutually exclusive RGB group, and the bit number of the second code is equal to that of the first code; the first code is obtained after the RGB value is converted;
if the RGB value obtained at the current time is not in a first mutually exclusive RGB group, converting the RGB value into a first code and sending the first code;
the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values.
2. The picture storing method applied to an oscilloscope according to claim 1, wherein the method further comprises:
receiving the first code;
and acquiring and displaying the corresponding RGB value according to the first code.
3. The picture storing method applied to an oscilloscope according to claim 1, wherein the method further comprises:
receiving the second code;
and acquiring and displaying the RGB value corresponding to the current time according to the second code.
4. The picture storing method applied to an oscilloscope according to claim 1, wherein after the RGB values of the picture are acquired, the method further comprises:
judging whether the RGB value obtained at the current time is in any third mutually exclusive RGB group;
wherein, the N third mutually exclusive RGB groups all include: m RGB values, each RGB value is taken from any one RGB value in M second RGB groups respectively, and M RGB values in N third mutually exclusive RGB groups are different; m of the second RGB groups each include: n different RGB values, and the current time includes the N different RGB values in the second RGB group at the same time; wherein, M is different from N RGB value;
if so, storing the second RGB group corresponding to the RGB value, and sending a third code, wherein the third code is formed by converting the RGB value acquired at the current time; the N different RGB values in the second RGB group correspond to the N third codes, and the N third codes corresponding to the N different RGB values in each second RGB group are all the same, and the number of bits of the third codes is equal to the number of bits of the first codes.
5. The picture storing method applied to the oscilloscope according to claim 4, wherein the method further comprises:
receiving the third code;
and acquiring and displaying the RGB value corresponding to the current time according to the third code.
6. A picture storage system for an oscilloscope, comprising:
a first acquisition unit configured to acquire RGB values of the picture;
the first judgment unit is used for judging whether the RGB value obtained at the current time is in a first mutually exclusive RGB group or not; the first mutually exclusive set of RGB includes: n different RGB values, and the current time only corresponds to one RGB value;
the device comprises a first storage unit, a second sending unit and a second conversion unit, wherein when the RGB values are located in a first mutually exclusive RGB group, the first storage unit is used for storing the RGB values corresponding to the current time, the second sending unit is used for sending a second code, and the second conversion unit is used for converting the first mutually exclusive RGB group into the second code; the number of bits of the second code is equal to the number of bits of the first code; the first code is obtained after the RGB value is converted;
the first conversion unit is used for converting each RGB value into a first code if the RGB value obtained at the current time is not in a first exclusive RGB group;
a first transmitting unit configured to transmit the first code;
the first codes corresponding to the same RGB values are the same, and the number of bits of the first codes is smaller than that of the RGB values.
7. The picture storage system applied to the oscilloscope according to claim 6, comprising:
a first receiving unit, configured to receive the first code;
and the first processing unit is used for acquiring the corresponding RGB value according to the first code and displaying the RGB value through a display unit.
CN201911116192.1A 2019-11-15 2019-11-15 Picture storage method and system applied to oscilloscope Active CN111220836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911116192.1A CN111220836B (en) 2019-11-15 2019-11-15 Picture storage method and system applied to oscilloscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911116192.1A CN111220836B (en) 2019-11-15 2019-11-15 Picture storage method and system applied to oscilloscope

Publications (2)

Publication Number Publication Date
CN111220836A CN111220836A (en) 2020-06-02
CN111220836B true CN111220836B (en) 2022-02-11

Family

ID=70828980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911116192.1A Active CN111220836B (en) 2019-11-15 2019-11-15 Picture storage method and system applied to oscilloscope

Country Status (1)

Country Link
CN (1) CN111220836B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6177892A (en) * 1984-09-26 1986-04-21 株式会社日立製作所 Color image display system
JP2003162713A (en) * 2001-11-26 2003-06-06 Matsushita Electric Ind Co Ltd Device and method for converting color
CN105842507A (en) * 2016-05-09 2016-08-10 优利德科技(中国)有限公司 Oscilloscope digit fluorescence display method and control apparatus
CN107103891A (en) * 2017-01-20 2017-08-29 艾体威尔电子技术(北京)有限公司 A kind of method that color/graphics is used in small internal memory embedded system
CN109001513A (en) * 2018-04-25 2018-12-14 深圳市鼎阳科技有限公司 The method and digital fluorescence oscilloscope of customized digital fluorescence oscilloscope channel color

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285037B2 (en) * 2005-02-28 2012-10-09 Nxp B.V. Compression format and apparatus using the new compression format for temporarily storing image data in a frame memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6177892A (en) * 1984-09-26 1986-04-21 株式会社日立製作所 Color image display system
JP2003162713A (en) * 2001-11-26 2003-06-06 Matsushita Electric Ind Co Ltd Device and method for converting color
CN105842507A (en) * 2016-05-09 2016-08-10 优利德科技(中国)有限公司 Oscilloscope digit fluorescence display method and control apparatus
CN107103891A (en) * 2017-01-20 2017-08-29 艾体威尔电子技术(北京)有限公司 A kind of method that color/graphics is used in small internal memory embedded system
CN109001513A (en) * 2018-04-25 2018-12-14 深圳市鼎阳科技有限公司 The method and digital fluorescence oscilloscope of customized digital fluorescence oscilloscope channel color

Also Published As

Publication number Publication date
CN111220836A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
US5559954A (en) Method & apparatus for displaying pixels from a multi-format frame buffer
US4490797A (en) Method and apparatus for controlling the display of a computer generated raster graphic system
CN101620842B (en) Image processing circuit, and display panel driver and display device mounting the circuit
KR101887236B1 (en) Display system and display device driver
US4668947A (en) Method and apparatus for generating cursors for a raster graphic display
CN111326099B (en) Display correction method, device and system, storage medium and display system
CN111429827B (en) Display screen color calibration method and device, electronic equipment and readable storage medium
CN101388950B (en) Content-adaptive contrast improving method and apparatus for digital image
KR100810401B1 (en) Display driver
CN104715708A (en) Driving Circuit for Display Apparatus
US6271827B1 (en) Display system
US4837710A (en) Emulation attribute mapping for a color video display
CN109754443B (en) Image data conversion method, device and storage medium
JP3317870B2 (en) Method for efficiently constructing display image and display processor system
CN111220836B (en) Picture storage method and system applied to oscilloscope
JPH07322074A (en) Equipment and method for data processing to process 2 level image file that a dither ring happened
US20090154802A1 (en) Method and apparatus for image compression and decompression
US6914614B2 (en) Color display method and semiconductor integrated circuit using the same
JP5988696B2 (en) Image compression circuit, image compression method, semiconductor device, and smartphone
CN211478425U (en) Picture storage device and system
US9020285B2 (en) Compressor, driving device, and display device
CN113658564A (en) Image color depth conversion method and electronic equipment
KR20050074543A (en) Image data processing apparatus
CN113709489B (en) Video compression method, device, equipment and readable storage medium
CN113709489A (en) Video compression method, device, equipment and readable storage medium

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
GR01 Patent grant
GR01 Patent grant