Light field vision detection method and light field vision detection device
The optical field and field images of the X-ray machine are obtained through the camera module, and the image attributes are analyzed to calculate the light field consistency parameters. This solves the problems of long detection, high cost, large error and large human influence in the prior art, and achieves efficient and accurate light field consistency detection.
Patent Information
- Application Number
- CN201911112964.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-14
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2039-11-14
AI Technical Summary
The methods used in the prior art for X-ray machine photo field consistency detection have problems such as long time, high cost, large measurement errors and large human-influence factors.
A light field visual detection method is adopted to obtain the light field image formed by the visible light emitted by the X-ray field indicator light and the field image formed by the X-ray field emitted by the X-ray machine through the camera module, and analyze the image attributes to calculate the light field consistency parameters.
The light field consistency detection is achieved with short time, low cost, small measurement error and small human-influence factors, improving detection efficiency and accuracy.
Smart Images

Figure CN110859641B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a light field detection technology, and in particular to a light field visual detection method and light field visual detection equipment for an X-ray machine. Background Art
[0002] The light field refers to the area defined by the simulated light of the X-ray machine (i.e. X-ray camera) head on the incident surface. The radiation field refers to the projection of the X-ray beam of the X-ray machine on the incident surface. To be precise, it is the area defined by 50% of the dose intensity in the center of the beam. In clinical diagnostic examinations, since the radiation field cannot be determined visually, visible light is usually used to simulate the radiation field. The light radiation field consistency test is mainly to verify the degree of overlap between the light field formed by the light and the radiation field formed by the X-ray, including the degree of deviation between the light field and the radiation field center or boundary.
[0003] The consistency between the light field and the radiation field is of great significance for clinical diagnostic photography: it can improve the efficiency of medical examinations, ensure the integrity of the examined parts, reduce the amount of wasted films due to missing parts, avoid unnecessary technical exposure of the examinee, reduce the public's lifetime medical exposure dose level, and reduce the number of cancer cases caused by radiation.
[0004] In China, the following specifications and standards have put forward testing requirements for the consistency of X-ray machine light fields: "WS76-2017 Quality Control Specifications for Conventional Medical X-ray Diagnostic Equipment", "JJG744—2004 Medical Diagnostic X-ray Radiation Source", "JJG1078-2012- Medical Digital Photography (CR, DR) System X-ray Radiation Source Calibration Procedure", etc.
[0005] Specifically, the optical field consistency detection methods of traditional X-ray machines include the following:
[0006] 1) Film imaging method - the principle is that the different thicknesses of high-density metals absorb different X-rays. The scales etched on the detection plate (these scales are used to align the light field in advance) are imaged on the film, and the difference between the radiation field and the light field is finally determined by the film;
[0007] 2) Fluorescence method: After some fluorescent materials are stimulated (irradiated), their fluorescence afterglow time is long. The difference between the luminous area and the pre-aligned light field is observed by naked eyes in a dark room to determine the difference between the two.
[0008] 3) Fluorescence video recording method - using video technology, a special test board with a scale printed on it is illuminated and the luminous image is picked up. After the video device finishes recording, the video file on the SD card of the recorder needs to be put on the computer, and then pause when the luminous image is seen. Then enlarge the video and let people look at the image and the scale.
[0009] However, the above method has the following defects:
[0010] 1) Film imaging method: This is a classic method, but its disadvantages are that it requires film development, is time-consuming, and has high cost (calculate the cost of the film);
[0011] 2) Fluorescence method: This method was developed mainly for radiotherapy. Its disadvantages are that it is expensive (imported products), requires a large amount of exposure, and cannot save data. Since it requires darkroom observation and the fluorescence brightness decays quickly, the detection process is more laborious. At the same time, since the fluorescence boundary is not sharp enough, the measurement error is large;
[0012] 3) Fluorescence video recording method: It is composed of a detection board, a camera device, and a data receiving and storage device, which is relatively complex. The disadvantages are: ① The camera needs to be fixed from above to find the angle and distance by yourself, and the focus needs to be adjusted each time, which will affect the image clarity. ② The reading depends on manual work. You need to insert the SD card of the camera into the computer, use the player, manually determine the brightest frame of the image, and pause the player. It requires quick eyes and hands. In addition, when reading the data on the scale, the edge blur is manually estimated, and the human influence factor is too large. Summary of the invention
[0013] In order to solve the above-mentioned problems in the prior art, it is necessary to provide a method and device for visual detection of the optical field of an X-ray machine, which has at least one of the advantages of low cost, small measurement error, and small human influence factors.
[0014] An embodiment of the present invention provides a light field visual detection method, which includes the following steps:
[0015] Step S11, obtaining a light field image formed by visible light emitted by the X-ray machine field indicator light captured by a camera module, wherein the light field image includes an illuminated light field area;
[0016] Step S12, obtaining a portal image formed on a portal detection plate by X-rays emitted by the X-ray machine and photographed by the camera module, wherein the portal image includes a portal area;
[0017] Step S13, analyzing the light field image to obtain image attributes of the light field area;
[0018] Step S14, analyzing the portal image to obtain image attributes of the portal area; and
[0019] Step S15, calculating the light field consistency parameter of the X-ray machine according to the light field area and the image attributes of the field area, the light field consistency parameter of the X-ray machine including the offset parameter of the field area relative to the light field area.
[0020] In one embodiment, each boundary line of the light field area has a preset point, two preset points define a straight line perpendicular to the boundary line, the field area defines multiple adjustment points corresponding to the preset points, the adjustment points are intersections of the boundary line of the field area and the straight line defined by the corresponding preset points, and the offset parameter of the field area relative to the light field area includes the offset distance of each adjustment point of the field area relative to the corresponding preset point of the light field area.
[0021] In one embodiment, the image attributes of the light field area and the portal area include a center position, a length, a width, and a rotation angle.
[0022] In one embodiment, the step of calculating the light field consistency parameter of the X-ray machine according to the light field area and the image attributes of the field area includes:
[0023] Calculating the coordinates of each preset point and the coordinates of any two points on the straight line defined by the preset point according to the image attributes of the light field area;
[0024] Calculating the coordinates of any two points on the boundary line of the portal area according to the image attributes of the portal area;
[0025] Calculating the coordinates of the adjustment point according to a calculation formula for the intersection of two intersecting straight lines; and
[0026] The offset distance of each adjustment point in the field of view relative to the corresponding preset point in the field of view is calculated using a calculation formula for the distance between two points according to the coordinates of each preset point and the coordinates of the corresponding adjustment point.
[0027] In one embodiment, the step of obtaining a portal image formed by X-rays emitted by the X-ray machine and captured by the camera module comprises:
[0028] Acquire at least two images formed by X-rays emitted by the X-ray machine captured by the camera module; and
[0029] The image with a higher brightness value among the at least two images is analyzed and acquired as the portal image.
[0030] In one embodiment, the step of analyzing and acquiring the image with a higher brightness value among the at least two images as the portal image comprises:
[0031] Step S1, obtaining the image and brightness value of the current camera module;
[0032] Step S2, determining whether the brightness value of the current image is greater than a preset threshold value, if the brightness value of the current image is less than or equal to the preset threshold value, executing step S1, if the brightness value of the current image is greater than the preset threshold value, executing step S3;
[0033] Step S3, taking the current image as the image with the highest brightness value, and updating the preset threshold to the brightness value of the current image, starting the timer at the same time, and executing step S4;
[0034] Step S4, determining whether the time from the first acquisition of the image to the acquisition of the current image exceeds the preset timer time, if the time from the first acquisition of the image to the acquisition of the current image is greater than or equal to the preset timer time, executing step S5, if the time from the first acquisition of the image to the acquisition of the current image is less than the preset timer time, executing step S1;
[0035] Step S5, outputting the image with the highest brightness value as a portal image.
[0036] In one embodiment, the step of obtaining a light field image formed by visible light emitted by an X-ray machine field indicator light captured by a camera module includes: adjusting the size of the X-ray machine light field area and projecting it onto a light field detection board, the camera module capturing the light field image, and receiving the light field image captured by the camera module.
[0037] In one embodiment, the step of analyzing the light field image or the portal image to obtain image attributes of the light field area or the portal area includes:
[0038] Performing binarization filtering on the light field image or the portal field image;
[0039] Analyzing the binary filtered image to obtain a contour graph; and
[0040] The minimum circumscribed rectangular area corresponding to the contour figure is calculated, and the minimum circumscribed rectangular area is used as the light field area or the radiation field area.
[0041] In one embodiment, the step of calculating the minimum circumscribed rectangular area corresponding to the contour graphic includes:
[0042] Step a1, calculating the circumscribed rectangle of the outline figure according to the direct calculation method, taking the original circumscribed rectangle of the outline figure as the minimum circumscribed rectangle RectMin and recording its length, width and area, assigning the area of the minimum circumscribed rectangle RectMin to the first variable AreaMin, and setting the rotation angle α=0 degrees;
[0043] Step a2, rotating the contour graphic by θ degrees, calculating the minimum circumscribed rectangle RectTmp of the rotated field contour graphic according to step a1, and assigning the area of the minimum circumscribed rectangle RectTmp to the second variable AreaTmp;
[0044] Step a3, setting the rotation angle α=α+θ, comparing the first variable AreaTmp and the second variable AreaMin, assigning the smaller value to AreaMin, and assigning the rotation angle α at this time to β=α, and assigning the rectangle information to the circumscribed rectangle RectMin=RectTmp;
[0045] Step a4, looping through steps a2 and a3 until a minimum circumscribed rectangle RectMin and a corresponding rotation angle α are finally obtained; and
[0046] Step a5: reversely rotate the minimum circumscribed rectangle RectMin calculated in step a4 by an angle β, so as to obtain the minimum circumscribed rectangle area as the light field area or the radiation field area.
[0047] An embodiment of the present invention also provides a light field visual detection device, which includes a light field image acquisition device and a control device, wherein the light field image acquisition device includes a camera module, a light field detection board and a field detection board, the camera module is used to obtain a light field image formed by the visible light emitted by the X-ray machine's field indicator light and to obtain a field image formed by the X-ray emitted by the X-ray machine irradiating the field detection board, the light field image includes an illuminated light field area, the field image includes a field area, the control device analyzes the light field image, calculates the image attributes of the light field area, analyzes the field image to obtain the image attributes of the field area, and calculates the light field consistency parameters of the X-ray machine based on the light field area and the image attributes of the field area, the light field consistency parameters of the X-ray machine include the offset parameters of the field area relative to the light field area.
[0048] In one embodiment, the light field detection plate is a transparent plexiglass plate with a cross scale line, the visible light emitted by the X-ray machine's field indicator light is projected onto the light field detection plate to form the light field area, and the camera module photographs the light field detection plate to obtain the light field image; the field detection plate is an X-ray fluorescent plate, and when the X-rays emitted by the X-ray machine are irradiated onto the field detection plate, the irradiated part will be stimulated to emit fluorescence to form the field area, and the camera module photographs the field detection plate to obtain the field image.
[0049] In one embodiment, the light field image acquisition device also includes a camera module and a shell, the shell includes a box body and a cover body with an opening, the opening is used to set the light field detection plate, the cover body is used to install the field detection plate and is used to cover the side of the opening of the box body, the camera module is accommodated in the box body and is used to shoot at the position corresponding to the opening to obtain the light field image and the field image.
[0050] In one embodiment, the camera module includes a sliding structure, a slider and a camera, the sliding structure is fixed in the box, the camera is arranged on the slider, the slider and the sliding structure slide together to drive the camera to move, and is used to adjust the object distance of the captured image to ensure the clearest image, and the sliding direction of the slider and the sliding structure is toward the opening or away from the opening.
[0051] In one embodiment, the box body includes a bottom plate and side walls connected around the bottom plate, the camera module also includes a fixed plate, the fixed plate is fixed to the bottom plate, the sliding structure is fixed on the fixed plate and thus fixed in the box body; the cover body is also pivotally connected to the edge of the box body, so that the field detection plate on the cover body can be selectively set corresponding to the opening.
[0052] In one embodiment, the sliding structure includes a sliding groove that slidably accommodates the slider, and the slider includes a sliding part and a connecting part connected to both ends of the sliding part, and the two connecting parts are respectively used to be fixed at both ends of the camera, and at least part of the sliding part and the connecting part are slidably accommodated in the sliding groove.
[0053] In one embodiment, the light field image acquisition device also includes a communication module, and the camera is also used to receive a control signal for shooting via the communication module and transmit the light field image and the portal image obtained by shooting to the control device.
[0054] Compared with the prior art, the light field vision detection method and the light field vision detection device can obtain and analyze the light field image and the field image and calculate and output the light field consistency parameters of the X-ray machine. Compared with the film method, there is no need to develop the film, so it has the advantages of less time consumption and low cost; compared with the fluorescence method, it has the advantages of low cost, small exposure, data preservation, relatively simple detection process, small measurement error, etc.; compared with the fluorescence recording method, no manual reading is required, and it has the advantages of less human influence factors, etc.
[0055] In one embodiment, the offset parameter is further calculated by analyzing the light field area and the projection area, especially calculating the offset distance of each adjustment point of the projection area relative to the corresponding preset point of the light field area, which has the advantage of facilitating the user to adjust the light projection field of the X-ray machine according to the offset parameter.
[0056] In one embodiment, obtaining the field area by using a binary filter and a minimum rotating rectangle algorithm also makes the calculation of the field area more accurate, with a lower error effect.
[0057] Furthermore, the light field image acquisition device can be provided with two detection plates, namely, a light field detection plate and a portal detection plate, so that the camera module can respectively capture the light field image and the portal image, and can avoid the mutual interference and difficulty in distinguishing caused by having the light field image and the portal image on one detection plate. In one embodiment, the cover is also pivotally connected to the edge of the box, so that the portal detection plate on the cover can be selectively arranged corresponding to the opening, making it more convenient for the camera module to separately capture the portal image and the light field image.
[0058] In one embodiment, the camera is slidably matched with the sliding structure via a slider, so that the distance between the camera and the detection plate can be easily adjusted, which has the advantage of being easy to use.
[0059] In one embodiment, the sliding structure, the slider and the camera are fixed in the box by the fixing plate, and in particular, the guiding sliding and fixing are performed in cooperation with the guiding locking piece and the guiding locking groove, which also has the advantages of convenient manufacturing, installation and high reliability.
[0060] In one embodiment, the communication module enables the camera module to communicate and cooperate with an external control device, and also has the advantages of simple operation and convenient use. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0062] Figure 1 It is a structural schematic diagram of a light field vision detection device according to an embodiment of the present invention.
[0063] Figure 2 yes Figure 1 The structural schematic diagram of the light field image acquisition device is shown.
[0064] Figure 3 yes Figure 2 A schematic diagram of the three-dimensional assembly structure of the camera module of the light field image acquisition device shown.
[0065] Figure 4 yes Figure 3 A three-dimensional exploded schematic diagram of the camera module shown.
[0066] Figure 5 yes Figure 1 The schematic diagram of the structure of the control device of the optical field vision detection device shown in FIG.
[0067] Figure 6 yes Figure 1 The structure diagram of the light field detection system of the control device of the light field visual detection equipment is shown.
[0068] Figure 7 yes Figure 1 The flowchart of the light source vision detection method used by the control device of the light source vision detection equipment is shown.
[0069] Figure 8 yes Figure 7 A flow chart of a method for acquiring a portal image in a method for optical portal vision detection is shown.
[0070] Fig. 9 yes Figure 7 A schematic diagram of the light field area of the light field image in the light field vision detection method is shown.
[0071] Fig.10 yes Figure 7 Schematic diagram of the calculation principle of light field consistency parameters of the light field visual detection method shown. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0074] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0075] The terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0076] Figure 1 : is a structural schematic diagram of an optical field vision detection device 10 of an embodiment of the present invention. The optical field vision detection device 10 includes an optical field image acquisition device 20 and a control device 30. The optical field image acquisition device 20 is used to correspond to the X-ray machine setting that needs to be detected, and to shoot the light field image formed by the visible light emitted by the X-ray machine field indicator light and the field image formed by the X-ray emitted by the X-ray machine. The control device 30 can be used to control the shooting of the optical field image acquisition device 20, and receive the light field image and the field image taken by the optical field image acquisition device 20 to calculate and output the optical field consistency parameter of the X-ray machine. The control device 30 can be an intelligent terminal, such as a personal computer (PC), a laptop, a tablet computer, a smart phone, etc., and is not limited to the above. A light field detection system is installed thereon, and a light field vision detection method can be executed to control the optical field acquisition device 20 and receive the light field image and the field image and calculate and output the optical field consistency parameter of the X-ray machine.
[0077] See also Figure 2 ,yes Figure 1 The structure diagram of the light field image acquisition device 20 is shown. The light field image acquisition device 20 includes a camera module 21 and a housing 22, and the housing 22 includes a box 221 and a cover 222 with an opening 223. The opening 223 is used to set a light field detection plate 23, and the cover 222 is used to install a field detection plate 24 and is used to cover the side of the opening 223 of the box 221. The camera module 21 is accommodated in the box 221 and is used to shoot at the position corresponding to the opening 223 to obtain the light field image on the light field detection plate 23 and the field image on the field detection plate 24.
[0078] Specifically, in this embodiment, the box body 221 includes a bottom plate 224 and a side wall 225 connected to the bottom plate 224, and the cover body 222 is pivotally connected to the edge of the side wall 225 adjacent to the opening, so that the field detection plate 24 installed on the cover body 222 can be selectively covered on the opening 223. It can be understood that in this embodiment, the box body 221 can include a plurality of side walls 224 connected end to end and can cooperate with the cover body 22 to form a closed receiving space. Figure 2 In the schematic diagram shown, in order to facilitate understanding of the position and structure of the camera module 21 in the box body 221, one of the side walls is not drawn.
[0079] See also Figure 3 and Figure 4 , Figure 3 yes Figure 2 The schematic diagram of the stereoscopic assembly structure of the camera module 21 of the light field image acquisition device 20 is shown. Figure 4 yes Figure 3 The camera module 21 is shown as a three-dimensional exploded schematic diagram. The camera module 21 includes a fixed plate 211, a sliding structure 212, a slider 213 and a camera 214. The fixed plate 211 is fixed on the bottom plate 224, and the sliding structure 212 is fixed on the fixed plate 211 and thus fixed in the box 221. The camera 214 is arranged on the slider 213. The slider 213 and the sliding structure 212 can slide together to drive the camera 214 to move, which is used to adjust the object distance of the captured image to ensure the clearest image, wherein the sliding direction of the slider 213 and the sliding structure 212 is the direction toward the opening 223 and the opposite direction away from the opening 223. The image pixel captured by the camera 214 can be 8 million pixels, but is not limited to the above.
[0080] Specifically, in this embodiment, the sliding structure 212 includes a sliding groove 212a that slidably accommodates the slider 213, and the slider 213 includes a sliding portion 213a and a connecting portion 213b connected to both ends of the sliding portion 213a. The two connecting portions 213b are respectively used to be fixed to the two ends of the camera 214 by screws, and at least parts of the sliding portion 213a and the connecting portion 213b are slidably accommodated in the sliding groove 212a.
[0081] Furthermore, the sliding structure 212 may also include a guide locking member (such as a bolt, not shown) and a guide locking groove 212b disposed at the bottom of the slide groove 212a, and the sliding portion 213a includes a through hole 213c, and the guide locking member is used to pass through the through hole of the slider 213 and lock with the guide locking groove 212b. In addition, the bottom of the sliding structure 212 may be locked with the fixing plate 211 by means of screws or other locking members. The fixing plate 211 may also be locked to the bottom plate 224 of the box body 222 by means of screws or other locking members.
[0082] The light field detection plate 23 includes a transparent glass plate, such as a transparent organic glass plate, on which there are crosshairs with scales corresponding to the visible light emitted by the X-ray machine. In a dark environment, when the visible light emitted by the field indicator light of the X-ray machine is projected onto the upper surface 231 (i.e., the light field collection surface) of the light field detection plate 23, the light field area will be illuminated to form a light field image having the light field area.
[0083] The field detection plate 24 includes an X-ray fluorescent plate, and emits fluorescence under X-ray irradiation. Specifically, the field detection plate 24 may include a field collection surface 241. When the cover body 222 is covered at the opening 223, the field collection surface of the field detection plate 24 is in contact with the upper surface 231 (i.e., the light field collection surface) of the light field detection plate 23, so that the distance between the camera module 21 and the field collection surface 241 of the field detection plate 24 is consistent with the distance between the light field collection surface of the light field detection plate 23.
[0084] The size of the light field detection plate 23 and the portal field detection plate 24 can be substantially the same, such as 200 mm*254 mm, but in other embodiments, they can also be other sizes. It is understood that the light field detection plate 23 and the portal field detection plate 24 can be detachably arranged on the housing 21 for easy replacement.
[0085] The light portal image acquisition device 20 further includes a communication module 25, and the camera 214 is also connected to the communication module 25 for communication, and is also used to receive a control signal for shooting sent by the control device 30 via the communication module 25, and transmit the light field image and the portal image obtained by shooting to the control device 30. In this embodiment, the communication module 25 is a wired communication module, such as a USB interface module, but in other embodiments, the communication module 25 may also be a wireless communication module such as Bluetooth.
[0086] like Figure 5 As shown, Figure 53 is a schematic diagram of the structure of the control device 30. The control device 30 may be an intelligent terminal, such as a personal computer, which may have a processor 31, a memory 32, a display 33, a communication module 34, an input device 35, and at least one communication bus 36. The communication bus is used to realize the connection and communication between these components. The memory 32 is installed / stored with a light beam detection system 320. The light beam detection system 320 may also be an application software, which includes at least one instruction. The processor 31 may execute at least one instruction of the light beam detection system 320, thereby realizing the light beam visual detection method of the present invention. The communication module 34 may also be a wired communication module, such as a USB interface module, but in other embodiments, the communication module 34 may also be a wireless communication module such as Bluetooth. The input device 35 may be a mouse, a keyboard, a touch screen, etc., but is not limited to the above.
[0087] The following describes the process and principle of how the light field image acquisition device 20 and the control device 30 of the light field vision detection device 10 detect the light field consistency parameters of the X-ray machine.
[0088] During detection, the light field image acquisition device 20 is first communicatively connected with the control device 30. Specifically, the communication module 25 of the light field image acquisition device 20 can be connected with the communication module 34 of the control device 30 via a data cable. Furthermore, the light field detection system 320 installed on the control device 30 is turned on by operating the input device 35. The user interface of the light field detection system 320 can be displayed through the display 33, and the real-time captured image of the camera module 21 of the light field image acquisition device 20 can be displayed in real time.
[0089] Furthermore, the cover 222 of the light field image acquisition device 20 is opened to expose the light field detection board 23, and the X-ray machine whose light field consistency parameters are to be detected is set opposite to the light field detection board 23, and the X-ray machine's field indicator light is turned on so that the cross center of the light field formed by the visible light it emits is roughly aligned with the cross line center on the light field detection board 23, and the light field formed by the visible light emitted by the X-ray machine's field indicator light is completely located within the area of the light field detection board 23.
[0090] By operating the input device 35 and pressing the light field photography button displayed on the user interface of the light field detection system 320, the control device 30 sends a first control signal which is provided to the camera module 21 via the communication modules 25 and 34 to control the camera module 21 to capture the light field image, and the light field image captured by the camera module 21 is further provided to the control device 30 via the communication modules 25 and 34. It can be understood that the size of the light field area formed by the field indicator light of the X-ray machine can be controlled by the control device 30 or the light field image acquisition device 20 can be adjusted.
[0091] Furthermore, the cover 222 of the optical portal image acquisition device 20 is placed on the box 221, and the real-time image captured by the camera module 21 of the optical portal image acquisition device 20 displayed on the display 33 is pitch black. By operating the input device 35, the portal photography button displayed on the user interface of the optical portal detection system 320 is pressed to turn on the X-ray machine to emit X-rays. The control device 30 sends a second control signal which is provided to the camera module 21 via the communication modules 25 and 34 to control the camera module 21 to capture the portal image. The portal image captured by the camera module 21 is further provided to the control device 30 via the communication modules 25 and 34.
[0092] The light field detection system 320 of the control device 30 executes the light field visual detection method according to the light field image and the field image to calculate and output the light field consistency parameter of the X-ray machine.
[0093] The following combination Figure 6 and Figure 7 The optical field visual detection method performed by the optical field detection system 320 is introduced. Figure 6 and Figure 7 , Figure 6 is a block diagram of the optical field detection system 320, Figure 7 yes Figure 1 Flow chart of the light field vision detection method used by the control device 30 of the light field vision detection device 10 shown in FIG. The light field detection system 320 includes a first acquisition module 321, a second acquisition module 322, a first analysis module 323, a second analysis module 324 and a calculation module 325. The light field vision detection method includes the following steps S11, S12, S13, S14 and S15.
[0094] Step S11, acquiring a light field image formed by visible light emitted by the X-ray machine field indicator light captured by the camera module, wherein the light field image includes an illuminated light field area. Specifically, step S11 can be controlled and executed by the first acquisition module 321.
[0095] The step S11 may include the following steps: controlling to generate and send a first control signal to the camera module 21 to control the camera module 21 to shoot the light field image; and receiving the light field image shot by the camera module 21. The first acquisition module 321 may acquire the first instruction generated by the detection personnel operating the input device 35 to generate the first control signal, and send the first control signal to the communication module 25 of the light field image acquisition device 20 through the communication module 34, and the communication module 25 of the light field image acquisition device 20 sends the first control signal to the camera 214 so that the camera 214 shoots the light field image; when the camera 214 completes shooting of the light field image, the shot light field image is sent by the camera 214 to the communication module 25 of the light field image acquisition device 20, and the communication module 25 of the light field image acquisition device 20 provides the light field image to the communication module 34 of the control device 30.
[0096] Step S12, acquiring a portal image formed by the X-rays emitted by the X-ray machine and photographed by the camera module, wherein the portal image includes a portal area. Specifically, step S12 can be controlled and executed by the second acquisition module 322.
[0097] The step S12 may be performed by the second acquisition module 322, and the step S12 may include:
[0098] Step S121, obtaining at least two images formed by the X-rays emitted by the X-ray machine and captured by the camera module; and
[0099] Step S122, analyzing and acquiring the image with a higher brightness value among the at least two images as the portal image.
[0100] Wherein, the step S121 may include: controlling to generate and send a second control signal to the camera module to control the camera module to capture the image, and receiving the image captured by the camera module. Specifically, the second acquisition module 322 may acquire the second instruction generated by the detection personnel operating the input device 35 to generate the second control signal, and send the second control signal to the communication module 25 of the optical field image acquisition device 20 through the communication module 24, and the communication module 25 of the optical field image acquisition device 20 sends the second control signal to the camera 214 so that the camera 214 captures the image; when the camera 214 completes the capture of the image, the captured image is sent by the camera to the communication module 25 of the optical field image acquisition device 20, and the communication module 25 of the optical field image acquisition device 20 provides the image to the communication module 34 of the control device 30.
[0101] It can be understood that in step S11, the light field image captured by the camera may be one image; and in step S12, the image captured by the camera 214 may be more than two images.
[0102] See also Figure 8 , Figure 8 3 is a flow chart of a method for acquiring a portal image used by the second acquisition module 322. The method for acquiring a portal image by the control device 30 includes the following steps S1-S5.
[0103] Step S1, obtaining the image and brightness value of the current camera module;
[0104] Step S2, determining whether the brightness value of the current image is greater than a preset threshold value, if the brightness value of the current image is less than or equal to the preset threshold value, executing step S1, if the brightness value of the current image is greater than the preset threshold value, executing step S3;
[0105] Step S3, taking the current image as the image with the highest brightness value, and updating the preset threshold to the brightness value of the current image, starting the timer at the same time, and executing step S4;
[0106] Step S4, determining whether the time from the first acquisition of the image to the acquisition of the current image exceeds the preset timer time, if the time from the first acquisition of the image to the acquisition of the current image is greater than or equal to the preset timer time, executing step S5, if the time from the first acquisition of the image to the acquisition of the current image is less than the preset timer time, executing step S1;
[0107] Step S5, outputting the image with the highest brightness value as a portal image.
[0108] It can be understood that in step S2, when step S1 is executed for the first time, the preset threshold is a lower initial value. If the brightness value of the current image is less than or equal to the initial value, it indicates that the X-ray machine has not started to emit X-rays. At this time, the current image is a completely black image, so it is necessary to return to execute step S1; if the brightness value of the current image is higher than the preset threshold, it means that the X-ray machine has started to emit X-rays.
[0109] The time for an X-ray machine to emit X-rays is generally several hundred milliseconds. The camera 214 can be turned on to continuously capture portal images within the time period when the X-rays are emitted. The preset time can be set to 3 seconds, but is not limited thereto.
[0110] Step S13, analyzing the light field image to obtain image attributes of the light field area. Step S13 may be performed by the first analysis module 323. Fig. 9 As shown, the image attributes of the light field area may include the center position, length, width, and rotation angle. Wherein, x, y are reference coordinate systems, p1, p2, p3, p0 represent the preset points of the light field area, width, height, centre, angle represent the width, length, centre, and rotation angle, respectively.
[0111] Specifically, step S13 may include:
[0112] Performing binarization filtering on the light field image;
[0113] Analyzing the light field image after the binary filtering to obtain a contour graph; and
[0114] The minimum circumscribed rectangular area corresponding to the contour figure is calculated, and the minimum circumscribed rectangular area is used as the light field area.
[0115] Specifically, the step of calculating the minimum circumscribed rectangular area corresponding to the contour graphic may include:
[0116] Step a1, calculating the circumscribed rectangle of the outline figure according to the direct calculation method, taking the original circumscribed rectangle of the outline figure as the minimum circumscribed rectangle RectMin and recording its length, width and area, assigning the area of the minimum circumscribed rectangle RectMin to the first variable AreaMin, and setting the rotation angle α=0 degrees;
[0117] Step a2, rotating the contour graphic by θ degrees, calculating the minimum circumscribed rectangle RectTmp of the rotated field contour graphic according to step a1, and assigning the area of the minimum circumscribed rectangle RectTmp to the second variable AreaTmp;
[0118] Step a3, setting the rotation angle α=α+θ, comparing the first variable AreaTmp and the second variable AreaMin, assigning the smaller value to AreaMin, and assigning the rotation angle α at this time to β=α, and assigning the rectangle information to the circumscribed rectangle RectMin=RectTmp;
[0119] Step a4, looping through steps a2 and a3 until a minimum circumscribed rectangle RectMin and a corresponding rotation angle α are finally obtained; and
[0120] Step a5: reversely rotate the minimum circumscribed rectangle RectMin calculated in step a4 by an angle β, so as to obtain the minimum circumscribed rectangle area as the light field area.
[0121] Step S14 , analyzing the portal image to obtain image attributes of the portal area. The step S14 may be performed by the second analysis module 324 .
[0122] Furthermore, the principle of step 14 may be substantially the same as that of step S13. Specifically, step S14 may include:
[0123] Performing binarization filtering on the portal image;
[0124] Analyzing the portal image after the binarization filtering to obtain a contour graph;
[0125] The minimum circumscribed rectangular area corresponding to the contour figure is calculated, and the minimum circumscribed rectangular area is used as the field area. The step of calculating the minimum circumscribed rectangular area corresponding to the field contour figure in step S14 may include steps a5-a8.
[0126] Step a5, calculating the circumscribed rectangle of the outline figure according to the direct calculation method, taking the original circumscribed rectangle of the outline figure as the minimum circumscribed rectangle RectMin and recording its length, width and area, assigning the area of the minimum circumscribed rectangle RectMin to the first variable AreaMin, and setting the rotation angle α=0 degrees;
[0127] Step a2, rotating the outline graphic by θ degrees, calculating the minimum circumscribed rectangle RectTmp of the rotated outline graphic according to step a1, and assigning the area of the minimum circumscribed rectangle RectTmp to the second variable AreaTmp;
[0128] Step a3, setting the rotation angle α=α+θ, comparing the first variable AreaTmp and the second variable AreaMin, assigning the smaller value to AreaMin, and assigning the rotation angle α at this time to β=α, and assigning the rectangle information to the circumscribed rectangle RectMin=RectTmp;
[0129] Step a4, looping through steps a2 and a3 until a minimum bounding rectangle RectMin and a corresponding rotation angle α are finally obtained;
[0130] Step a5, reversely rotating the minimum circumscribed rectangle RectMin calculated in step a4 by an angle β, so as to obtain the minimum circumscribed rectangle area as the field area.
[0131] Step S15, calculating the light field consistency parameter of the X-ray machine according to the light field area and the image attributes of the field area, wherein the light field consistency parameter of the X-ray machine includes an offset parameter of the field area relative to the light field area. Step S15 may be performed by the calculation module 325.
[0132] Specifically, Fig.10 As shown, the light field area is roughly a rectangular area, which includes vertices P0, P1, P2, and P3, and each boundary line has a preset point P01, P12, P23, and P30. In this embodiment, the preset points P01, P12, P23, and P30 are the midpoints of each boundary line. Two corresponding preset points P01 and P23 define a straight line L1 perpendicular to the boundary line, and two corresponding preset points P12 and P30 define a straight line L2 perpendicular to the boundary line.
[0133] The field area is also roughly a rectangular area, which includes vertices Q0, Q1, Q2, and Q3, and defines multiple adjustment points A, B, C, and D corresponding to the vertices and the preset points. The adjustment points A, B, C, and D are respectively the intersections of the boundary lines L3, L4, L5, and L6 of the field area and the straight line L1 or L2 defined by the corresponding preset points. The offset parameters of the field area relative to the light field area include the offset distances Aa, Bb, Cc, and Dd of each adjustment point A, B, C, and D of the field area relative to the corresponding preset points P01, P12, P23, and P30 of the light field area, which are respectively recorded as: Aa = Dis (A, P01), Bb = Dis (B, P12), Cc = Dis (C, P23), and Dd = Dis (D, P30). Among them, as Fig.10As shown, the straight line passing through Q0 and Q1 is recorded as L3, the straight line passing through Q1 and Q2 is recorded as L4, the straight line passing through Q2 and Q3 is recorded as L5, and the straight line passing through Q3 and Q0 is recorded as L6. The intersection of L1 and L3 is A, the intersection of L2 and L4 is B, the intersection of L1 and L5 is C, and the intersection of L2 and L6 is D.
[0134] Specifically, step S15 may include:
[0135] Step S151, calculating the coordinates of each preset point and the coordinates of any two points on the straight line defined by the preset point according to the image attributes of the light field area;
[0136] Step S152, calculating the coordinates of any two points on the boundary line of the portal area according to the image attributes of the portal area;
[0137] Step S153, calculating the coordinates of the adjustment point according to the calculation formula of the intersection of two intersecting straight lines;
[0138] Step S154 , calculating the offset distance of each adjustment point in the field area relative to the corresponding preset point in the field area using a distance calculation formula according to the coordinates of each preset point and the coordinates of the corresponding adjustment point.
[0139] Specifically, it can be understood that the calculation formula of the intersection of the two intersecting straight lines is shown in the following formula 1 and formula 2, and the calculation formula of the distance between the two points is shown in the following formula 3. Among them, X and Y in formula 1 and formula 2 represent the coordinates of the intersection, x1-x4 represent the x coordinates of the known points of the two intersecting straight lines (each straight line has two known points), and y1-y4 represent the y coordinates of the known points of the two intersecting straight lines. In formula 3, x1 and x2 are the x coordinates of the two known points, and y1 and y2 represent the y coordinates of the two known points.
[0140]
[0141]
[0142]
[0143] Compared with the prior art, the light field vision detection method and system 320 and the light field vision detection device 10 can obtain and analyze the light field image and the field image and calculate and output the light field consistency parameters of the X-ray machine. Compared with the film method, there is no need to develop the film, so it has the advantages of less time consumption and low cost; compared with the fluorescence method, it has the advantages of low cost, small exposure, data preservation, relatively simple detection process, small measurement error, etc.; compared with the fluorescence recording method, no manual reading is required, and it has the advantages of less human influence factors, etc.
[0144] Furthermore, in one embodiment, the camera module 21 is controlled to shoot by the first control signal and the second control signal, and the light field consistency parameters are further calculated based on the light field image and the projection field image, so that the overall detection method is reasonably and process-based controlled, and has the characteristics of simple detection process, small measurement error, and less human influence factors.
[0145] In one embodiment, the algorithm of steps S1-S5 is used to obtain the portal image with the highest brightness value as the portal image, which can avoid the disadvantages of high error caused by the existing human eye judging the portal image with the highest brightness.
[0146] In one embodiment, the offset parameters are further calculated by analyzing the light field area M1 and the beam area M2, especially calculating the offset distances Aa, Bb, Cc, and Dd of each adjustment point of the beam area M2 relative to the corresponding preset point of the light field area M1, which has the advantage of being convenient for the user to adjust the light beam of the X-ray machine according to the offset parameters.
[0147] In one embodiment, obtaining the field area M2 by using a binary filter and a minimum rotating rectangle algorithm also makes the calculation of the field area M2 more accurate, with a lower error effect.
[0148] Furthermore, in an embodiment of the light field image acquisition device 20, the light field image acquisition device can be provided with two detection plates, namely a light field detection plate 23 and a portal detection plate 24, so that the camera module can respectively take light field images and portal images, and can avoid the mutual interference and difficulty in distinguishing caused by having light field images and portal images on one detection plate. In an embodiment, the cover 222 is also pivotally connected to the edge of the box 221, so that the portal detection plate 24 on the cover 221 can be selectively arranged corresponding to the opening 223, making it more convenient for the camera module 21 to separately take the portal image and the light field image.
[0149] In one embodiment, the camera 214 is slidably matched with the sliding structure 213 via a slider 214 , so that the distance between the camera 214 and the detection plates 23 , 24 can be easily adjusted, which has the advantage of being easy to use.
[0150] In one embodiment, the sliding structure 212, the slider 213 and the camera 214 are fixed in the box 222 by the fixing plate 211, and in particular, the guiding sliding and fixing are performed in cooperation with the guiding locking piece and the guiding locking groove, which also has the advantages of convenient manufacturing, installation and high reliability.
[0151] In one embodiment, the camera module 21 can communicate and cooperate with the external control device 30 through the communication module 25, and also has the advantages of simple operation and convenient use.
[0152] It should be noted that the control device 30 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc. The control device 30 may also include network devices and / or user devices. Among them, the network device includes but is not limited to a single network server, a server group consisting of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. The control device 30 can be, but is not limited to, any electronic product that can interact with the user through a keyboard, touchpad or voice control device, such as a tablet computer, a smart phone, a personal digital assistant (PDA), a smart wearable device, a camera device, a monitoring device and other terminals.
[0153] The network where the control device 30 is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0154] The communication device may be a wired transmission port or a wireless device, for example, including an antenna device for performing data communication with other devices.
[0155] The memory is used to store program code. The memory can be a circuit with storage function in an integrated circuit without a physical form, such as RAM (Random-Access Memory), FIFO (First In First Out), etc. Alternatively, the memory can also be a memory with a physical form, such as a memory stick, TF card (Trans-flash Card), smart media card (smart media card), secure digital card (secure digital card), flash memory card (flash card) and other storage devices, etc.
[0156] The processor may include one or more microprocessors or digital processors. The processor may call the program code stored in the memory to execute related functions; for example, Figure 6 Each module described in the invention is a program code stored in a memory and executed by the processor to implement an innovative team member recommendation method. The processor is also called a central processing unit (CPU), which is a large-scale integrated circuit and a computing core (Core) and a control core (Control Unit).
[0157] An embodiment of the present invention may also provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by one or more processors, execute at least one of the optical portal visual detection method and portal image acquisition method described in the above method embodiment.
[0158] The characteristic means of the present invention described above can be implemented by an integrated circuit, and control the functions of the optical portal visual detection method and the portal image acquisition method described in any of the above embodiments.
[0159] The functions that can be achieved by the optical projection field vision detection method and the projection field image acquisition method in any embodiment can be installed in the electronic device through the integrated circuit of the present invention, so that the electronic device can play the functions that can be achieved by the optical projection field vision detection method and the projection field image acquisition method in any embodiment, which will not be described in detail here.
[0160] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0161] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0166] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A light field visual detection device, characterized in that: The optical field vision detection device includes an optical field image acquisition device and a control device. The optical field image acquisition device includes a camera module, a light field detection board, a field detection board and a shell. The camera module is used to obtain a light field image formed by visible light emitted by the X-ray machine's field indicator light and to obtain a field image formed by X-rays emitted by the X-ray machine irradiating the field detection board. The light field image includes an illuminated light field area. The field image includes a field area. The light field detection board is a transparent organic glass plate with a cross scale line. The visible light emitted by the X-ray machine's field indicator light is projected onto the light field detection board to form the light field area. The camera module photographs the light field detection board to obtain the light field image. The field detection board is an X-ray fluorescent board. When the X-rays emitted by the X-ray machine irradiate the field detection board, they will excite the irradiation part. Fluorescence is emitted to form the portal area, the camera module photographs the portal detection plate to obtain the portal image, the housing includes a box body and a cover body with an opening, the opening is used to set the light field detection plate, the cover body is used to install the portal detection plate and is used to cover the side of the opening of the box body, the camera module is accommodated in the box body and is used to photograph at the position corresponding to the opening to obtain the light field image and the portal image, the control device analyzes the light field image, calculates the image attributes of the light field area, analyzes the portal image, calculates the image attributes of the portal area, and calculates the light portal consistency parameters of the X-ray machine based on the light field area and the image attributes of the portal area, the light portal consistency parameters of the X-ray machine include the offset parameters of the portal area relative to the light field area.
2. The optical field vision detection device according to claim 1, characterized in that: The camera module includes a sliding structure, a slider and a camera. The sliding structure is fixed in the box, and the camera is arranged on the slider. The slider and the sliding structure slide together to drive the camera to move, so as to adjust the object distance of the captured image to ensure a clear image. The sliding direction of the slider and the sliding structure is toward the opening or away from the opening.
3. The optical field vision detection device according to claim 2, characterized in that: The box body includes a bottom plate and side walls connected around the bottom plate, the camera module also includes a fixed plate, the fixed plate is fixed to the bottom plate, the sliding structure is fixed on the fixed plate and thus fixed in the box body; the cover body is also pivotally connected to the edge of the box body, so that the field detection plate on the cover body can be selectively set corresponding to the opening.
4. The optical field vision detection device according to claim 3, characterized in that: The sliding structure includes a sliding groove for slidably accommodating the slider, the slider includes a sliding part and a connecting part connected to both ends of the sliding part, the connecting parts at both ends of the sliding part are respectively used to be fixed to the two ends of the camera, and at least parts of the sliding part and the connecting part are slidably accommodated in the sliding groove.
5. The optical field vision detection device according to claim 4, characterized in that: The light field image acquisition device also includes a communication module, and the camera is also used to receive a control signal for shooting via the communication module and transmit the light field image and the portal image obtained by shooting to the control device.
Citation Information
Patent Citations
Light radiation field consistency detection module, method, device and equipment
CN107693959A
Light field visual inspection equipment and light field image acquisition device
CN211796530U