A method for displaying long-range measurement data on a screen
By setting the measurement distance and pixel size, calculating the scale and screen number, and combining the repeat display cache and network database, the problem of arbitrary distance data display and querying for long-distance measurement data is solved, realizing fast and convenient data display and querying, and supporting intuitive display of C-scan images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for long-distance measurement data display suffer from several drawbacks, including the inability to display data at arbitrary distances, cumbersome querying, inability to intuitively display C-scan images, and general inconvenience in use.
By initializing settings to measure the maximum distance and pixel size, calculating the scale, determining the screen number, displaying judgments and drawing real-time graphs, quickly viewing information, and saving data to the database, the system employs a repeating cache and a network database to achieve fast data display and retrieval.
It enables the display of data at any distance, adapts to forward and backward navigation, has a small memory footprint, is easy to query, displays images quickly, and provides an intuitive display of C-scan images.
Smart Images

Figure CN116821212B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of distance measurement, in particular to a long distance measurement data display method on screen. BACKGROUND
[0002] Long distance measurement is applied to pipeline, container, plate, railway, surveying and many other fields. The long distance detection data is transmitted to the computer end for analysis and processing through the detection device. The existing display data method includes single screen fixed distance interval display measurement data and single screen multi-line display long distance data. The single screen fixed distance interval display measurement data only displays single line data of limited length interval. The single screen multi-line display long distance data does not display distance coordinates on the horizontal axis, and cannot realize long distance detection. The query data is also relatively cumbersome. In addition, the C-scan diagram cannot be intuitively displayed, and is inconvenient to use. SUMMARY
[0003] The present application aims to solve the above problems and provide a long distance measurement data display method on screen which can display data of any distance, adapt to forward and reverse, and is simple to query original data and easy to use.
[0004] To achieve the above purpose, the technical scheme of the present application is as follows: a long distance measurement data display method on screen, comprising the following steps: (1) initialization, setting the maximum measurement distance, the minimum X-axis interval distance and the pixel size; (2) calculating the scale, calculating the starting scale and ending scale value of each screen of the screen, and the screen number is 0-N; (3) calculating the screen number, calculating the screen number iScreenNo corresponding to the distance of the current collected data; (4) display judgment, determining whether the current data is displayed on the graph; (5) drawing the corresponding real-time graph; (6) fast information viewing, viewing the position information corresponding to the screen scale; (7) data saving, saving the current row data to the database.
[0005] Preferably, after setting the maximum measurement distance, the minimum X-axis interval distance and the pixel size in step (1), the starting scale and the ending scale of each screen in the positive direction of the X-axis are calculated.
[0006] Preferably, in step (2), when the screen number 0-N is bidirectional running mode, the terminal distance of the odd row is recorded, and the even row is running to the origin in a distance decreasing manner based on the distance again.
[0007] Preferably, the step (2) of calculating the start scale and the end scale value of each screen ruler is: (21) setting screen column number = image width / interval occupies screen width = screen column number * interval distance screen serial number = 0; default g_iCurrUse_ScreenNo = 0; (22) inputting the first screen serial number; (23) setting start scale = 0, end scale = screen width; (24) screen serial number + 1; (25) inputting the subsequent screen serial number; (26) start scale = last screen end scale, end scale = current screen serial number * screen width + screen width.
[0008] Preferably, the step (3) of calculating the screen serial number further comprises drawing a history data graph, and the drawing of the history data graph comprises the following steps: (31) iScreenNo = g_iCurrUse_Screen; (32) g_iCurrUse_ScreenNo = iScreenNo, interface scale initialization, drawing interface scale; (33) obtaining historical data from the database according to the start and end of the current screen and the running line number of the vehicle body; (34) setting N numbers; (35) sequentially obtaining current data to draw corresponding images, and placing ID, main attribute to the position corresponding to distance and line number in the display buffer.
[0009] Preferably, the corresponding images in the step (35) comprise A scan, B scan and C scan; wherein the A scan is a waveform graph corresponding to original data, the B scan is a cross-sectional view of an object, and the C scan is a top view of the interface thickness of the object.
[0010] Compared with the prior art, the long-distance measurement data display method on the screen disclosed by the application has the following beneficial effects: 1. data of any distance can be displayed; 2. it can adapt to forward and reverse movement; 3. the occupied memory is small: the image capacity is not large, and the additional buffer is only the display buffer, which is a linked list, and the data type is a structure, which contains data ID number and main information such as thickness value, and additional attributes can be freely added according to the capacity size; 4. the drawing speed is fast, and only one point of data is drawn each time; 5. the mouse moving for checking information is fast, and the displayed information is in the buffer corresponding to the display position; 6. the mouse moving for checking information is accurate, and the displayed information is the attribute of the actual data, and the additional attributes contain the ID number of the data table in the database, so that the original data is simple to query, and if the original data is contained in the additional attribute data structure, the database does not need to be queried; 7. the historical data query is simple, and the data is directly called to draw a graph according to the start and end scales and the main keys corresponding to the screen serial number; 8. the database adopts a network database, which can be operated in parallel and has high speed; 9. bidirectional or unidirectional movement can be realized, and since the position corresponds to the coordinate axis according to the rectangular row and column formula, the C scan graph can be realized. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 The program principle flow chart for the method of displaying long distance measurement data on a screen in the present application.
[0012] Figure 2 The program principle flow chart for calculating the start and end scales of each screen in the present application.
[0013] Figure 3 The principle flow chart for drawing history data in the present application. DETAILED DESCRIPTION
[0014] The present application will now be described in further detail with reference to the drawings. The drawings are simplified schematic views which show the basic structure of the present application in a schematic manner only, and therefore only show the components relevant to the present application.
[0015] Referring to Figure 1 A method of displaying long distance measurement data on a screen, comprising the following steps: (1) setting the measurement maximum distance, the X-axis minimum display interval distance (for example, 10 mm), and calculating the start scale and the end scale of each screen in the positive direction of the X-axis, recording the odd row end point distance when the screen sequence number is 0-N and the bidirectional running mode, and the even row running to the origin in a distance decreasing mode based on the distance, etc.; referring to Figure 2 Specifically, the calculation steps of the start scale and the end scale values are as follows: (21) setting the screen column number = image width / one interval occupies the screen width = screen column number*one interval distance screen sequence number = 0; default g_iCurrUse_ScreenNo = 0; (22) inputting the first screen sequence number; (23) setting the start scale = 0 and the end scale = screen width; (24) screen sequence number + 1; (25) inputting the subsequent screen sequence number; (26) start scale = last screen end scale and end scale = current screen sequence number*screen width + screen width.
[0016] (2) taking the distance corresponding to the current collected data to calculate the screen sequence number iScreenNo corresponding to the distance.
[0017] (3) drawing the history data graph according to the sequence number iScreenNo;
[0018] Referring to Figure 3, draw historical data graph, draw historical data graph includes the following steps: (31) iScreenNo! = g_iCurrUse_Screen; (32) g_iCurrUse_ScreenNo= iScreenNo, interface scale initialization, draw interface scale; (33) according to the current screen start and end and the body running line number, get historical data from the database; (34) set N number; (35) in turn take the current data to draw the corresponding image, and put the ID, main attribute into the display buffer distance, line number corresponding position.
[0019] (4) determine whether the current data is displayed: take the current data, find the screen corresponding position according to the distance (calculate the distance value of the measured data according to the current screen start value and the smallest interval value of the scale to calculate the corresponding position sequence number of the measured data in the screen X axis, and then calculate the actual display position of the measured data in the screen coordinates according to the coordinate start pixel value and an interval occupied pixel width), compare the data in this position with the current data to determine whether to display the current data on the screen: because there are at most 10 data in a display interval, for example, 10mm, but only one can be displayed, according to the display rule (such as only display the maximum thickness error) SHAPE \* MERGEFORMAT, determine whether to cover.
[0020] (5) if it is displayed on the screen, take the current real-time data;Draw the corresponding image (A scan, B scan, C scan);Put the ID, main attribute value into the display buffer distance, line number corresponding position, because the additional attribute contains the ID number of the corresponding data table in the database, it is simple to query the original data, if the original data is contained in the additional attribute data structure body, it is not necessary to query the database.
[0021] (6) mouse moves on B scan and C scan image, displays the information of the screen scale corresponding position, such as to view the original data, click to call the original data display A scan image.
[0022] (7) save the current line data to the database, if the current line distance is repeated, overwrite the old one;Because the image capacity is not large, in addition to the cache, which is a linked list, the data type is structure body, this structure body contains data ID number and main information such as thickness value, additional attributes can be freely added according to the capacity size.
[0023] (8) stop detection, left and right screen change.
[0024] In the present application, A-scan is the waveform diagram corresponding to the original data; B-scan is the thickness value measured by each row, each thickness value corresponds to a color, the X axis corresponds to the distance, and the Y axis corresponds to the thickness height, which is the cross-sectional view of the object; C-scan is the data measured by multiple rows in the same area, each thickness value corresponds to a color, and the graph drawn thereby can reflect the thickness variation of the area, which is like the overhead view of the object interface thickness.
[0025] In use, the data is transmitted to the computer through the software by the detection robot crawling detection: the maximum distance of the measurement can be set or a commonly used constant value can be used by default, and g_iCurrUse_ScreenNo=0 is also used by default; the corresponding table of the start and end values of each screen scale and the screen number is calculated; the data range is limited to the distance range corresponding to the current screen number each time; the primary key of the measurement data is the row number and the distance value; the distance value is converted into the screen corresponding number iScreenNo; when g_iCurrUse_ScreenNo is not equal to iScreenNo, the start and end scales corresponding to iScreenNo are used to refresh the screen, draw the screen X axis, and set g_iCurrUse_ScreenNo=iScreenNo; in this screen, the distance value of the measurement data is calculated according to the start value of the current screen and the minimum interval value of the scale to obtain the position number corresponding to the screen X axis, and then the actual display position of the measurement data in the screen coordinate is calculated according to the start pixel value of the coordinate and an interval pixel width, and then the graph is drawn according to the thickness and color correspondence; the display buffer is increased to prepare for the current screen data reproduction and the basis for judging whether the data is displayed; according to the screen data display principle, such as the maximum thickness error display, it is judged whether the current data can be displayed to the position corresponding to the screen X axis, and if it can be displayed, the B-scan and C-scan graphs are drawn; the database uses a network database to improve the processing speed and parallel operation background; the historical data processing only refreshes the data corresponding to the current screen number each time, thereby reducing the data amount of each operation; the running mode is based on the rectangular matrix, and the position corresponds to the coordinate axis whether it is bidirectional running or unidirectional running, so that the C-scan graph is realized.
[0026] Based on the above embodiments, the flow of the present application can be reduced, the display buffer can be directly displayed if it is not needed, or there is a fixed judgment rule for judging whether the data is displayed; when the mouse moves to display the historical data, the color of the graph can be converted into the distance, and the corresponding information can be obtained by taking the distance as the primary key to view the database.
[0027] Based on the above embodiments one and two, the database or the network database is not used in the present application, and other ways are used to save data.
[0028] Based on the above-mentioned embodiments one, two, three, the application can not separate screen processing data, and display the data on a sliding control.
[0029] Based on the above-mentioned embodiments one, two, three, four, drawing does not necessarily draw a B-scan or C-scan, and drawing is only a data display form; in addition, a running track is not necessarily fixed as a line, and can be a curve mode, but the principle is a rectangular matrix principle corresponding to the X-axis and Y-axis.
[0030] Obviously, the above-mentioned embodiments are only examples for clearly illustrating, and are not limitations to the embodiments. For ordinary skilled in the art, other different forms of changes or variations can be made on the basis of the above-mentioned description. Here, all the embodiments need not and cannot be exhausted. The obvious changes or variations derived therefrom are still within the protection scope of the present application.
Claims
1. A method for displaying long-distance measurement data on a screen, characterized in that, The steps include: (1) Initialization, setting the maximum measurement distance, the minimum display spacing distance on the X-axis, and the pixel size; (2) Calculating the scale, calculating the start and end scale values of each screen, screen number 0-N. The calculation steps for the start and end scale values of each screen scale in step (2) are as follows: (21) Set the number of screen columns = image width / pixels occupied by an interval; screen width = number of screen columns * distance of an interval; screen number = 0; default g_iCurrUse_ScreenNo = 0; (22) Input the first screen number; (23) Set the start scale = 0, end scale = screen width; (24) screen number + 1; (25) Input the subsequent screen numbers; (26) start scale = the end scale of the previous screen, end scale = current screen number * screen width + screen width; (3) Calculate the screen number. Calculate the screen number iScreenNo corresponding to the distance of the currently collected data. The calculation of the screen number in step (3) also includes drawing a historical data graph. Drawing a historical data graph includes the following steps: (31) When iScreenNo!=g_iCurrUse_ScreenNo; (32) Set g_iCurrUse_ScreenNo= iScreenNo, initialize the interface scale, and draw the interface scale; (33) According to the start and end of the current screen scale and the row number; the row number is the primary key of the measurement data. Take the historical data from the database; (34) Set N numbers; (35) Take the current data in sequence to draw the corresponding image. Put the data ID and main attribute value into the position corresponding to the distance and row number in the display buffer; the corresponding image in step (35) includes A scan, B scan and C scan; where A scan is the waveform corresponding to the original data, B scan is the cross-sectional view of the object, and C scan is the top view of the thickness of the object interface; (4) Display judgment: Determine whether the current data is displayed on the graph, including finding the corresponding position on the screen based on the distance of the current data, comparing the cached data at this position with the current data, and determining whether to display the current data on the screen. Only one number is displayed in one display interval. (5) Draw the corresponding real-time graph. (6) Quick information viewing: View the information corresponding to the display screen scale. (7) Data saving: Save the current row data to the database.
2. The method for displaying long-distance measurement data on a screen according to claim 1, characterized in that, In step (1), after setting the maximum measurement distance, the minimum display spacing distance on the X-axis, and the pixel size, the start and end scales of each screen in the positive direction of the X-axis are calculated accordingly.
3. The method for displaying long-distance measurement data on a screen according to claim 1, characterized in that, In step (2), when the screen number 0-N is running in a bidirectional manner, the distance to the end point of the odd-numbered rows is recorded, and the distance to the even-numbered rows is reduced based on this distance to the origin.
Citation Information
Patent Citations
Multi-line graph page-turning query method for corrosion thickness measurement data
CN109857733A