[go: up one dir, main page]

CN114688982B - Thickness compensation method for fruit tray - Google Patents

Thickness compensation method for fruit tray Download PDF

Info

Publication number
CN114688982B
CN114688982B CN202210332125.9A CN202210332125A CN114688982B CN 114688982 B CN114688982 B CN 114688982B CN 202210332125 A CN202210332125 A CN 202210332125A CN 114688982 B CN114688982 B CN 114688982B
Authority
CN
China
Prior art keywords
light source
target point
fruit tray
included angle
target
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
CN202210332125.9A
Other languages
Chinese (zh)
Other versions
CN114688982A (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.)
Beijing Zhenwubense Technology Co ltd
Original Assignee
Beijing Zhenwubense Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhenwubense Technology Co ltd filed Critical Beijing Zhenwubense Technology Co ltd
Priority to CN202210332125.9A priority Critical patent/CN114688982B/en
Publication of CN114688982A publication Critical patent/CN114688982A/en
Application granted granted Critical
Publication of CN114688982B publication Critical patent/CN114688982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/06Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness for measuring thickness ; e.g. of sheet material

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a thickness compensation method of a fruit tray, which aims at different areas of the fruit tray, and can calculate the thickness compensation value of each point on the surface of different areas based on the generation factors of superposition shadows in different areas.

Description

Thickness compensation method for fruit tray
Technical Field
The invention belongs to the technical field of fruit shooting compensation, and particularly relates to a thickness compensation method of a fruit tray.
Background
At present, the internal quality detection of fruits is more and more concerned, so that the nondestructive detection is an important method for grading factories; meanwhile, most of domestic fruit quality detection is to collect fruit images under the irradiation of light (including x-ray and near infrared light), so that fruits are required to be placed at a certain angle and photographed at the top, and the fruit images are collected.
In China, most of the fruit trays are used for realizing the vertical placement of fruits, but the following problems are faced in the process of irradiating the trays with light rays: uncertainty of shadow superposition caused by unfixed illumination angle, different overall thickness and density of the tray penetrated by a single light source in an inclined way, and deformation problem of fruits and the tray caused by different light irradiation directions; therefore, when light passes through the fruits contained in the tray, the space three-dimensional structure, thickness and density of the tray can generate superposition shadows with the fruits, so that the fruit image is influenced, and the quality detection of the fruits is not facilitated; therefore, a compensation method for a tray is provided to change parameters of the tray, so as to avoid the influence of the tray on fruit images during shooting.
Disclosure of Invention
The invention aims to provide a thickness compensation method of a fruit tray, which aims to solve the problem that the existing fruit tray is unfavorable for fruit quality detection because of the influence of the three-dimensional structure, thickness and density of the fruit tray on fruit images during shooting.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
In a first aspect, the invention provides a thickness compensation method for a fruit tray, which is used for performing thickness compensation on the bottom of the fruit tray so as to eliminate the superposition shadow of the fruit tray on fruits when the fruits are shot, wherein the fruit tray comprises a chassis and a plurality of support plates, and the plurality of support plates are uniformly arranged around the center of the chassis, wherein the plurality of support plates form a truncated cone shape with the diameter gradually increasing from bottom to top, and a reinforcing plate is arranged between every two adjacent support plates;
The chassis comprises a first area and a second area, wherein the thickness of the first area gradually decreases from the center to the edge of the first area, the thickness of the second area gradually increases from the center to the edge of the second area, the first area is an area surrounded by the plurality of support plates on the chassis, and the second area is an area on the chassis except for the first area, and the method comprises the following steps:
acquiring parameter information, chassis coordinate information and light source coordinate information of a fruit tray, wherein a light source of the fruit tray is positioned right above the center of a chassis, the parameter information comprises the thickness of each supporting plate and the inclination angle of each supporting plate, the chassis coordinate information comprises a plurality of first target point coordinates and a plurality of second target point coordinates, the plurality of first target points are all points forming the surface of a first area, and the plurality of second target points are all points forming the surface of a second area;
Obtaining a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point according to the chassis coordinate information and the light source coordinate information, wherein the light source irradiation included angle of each first target point is an included angle between a connecting line of each first target point and a light source vertical line, the light source irradiation included angle of each second target point is an included angle between a connecting line of each second target point and the light source and a light source vertical line, and the light source vertical line is a connecting line between the light source and the chassis center;
Obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point, wherein the light source penetration distance corresponding to each second target point is the penetration distance of a connecting line between each second target point and the light source on a corresponding target supporting plate, and the target supporting plate is a supporting plate through which the connecting line between each second target point and the light source passes;
And obtaining a thickness compensation value of each first target point based on the light source irradiation included angle of each first target point and obtaining a thickness compensation value of each second target point based on the light source penetration distance corresponding to each second target point, so as to complete thickness compensation of the chassis according to the thickness compensation value of each first target point and the thickness compensation value of each second target point.
Based on the above disclosure, the two areas at the bottom of the fruit tray are used as the thickness compensation areas, and the surfaces of the two areas are respectively represented by the plurality of target points, namely, the target points are used as the irradiation points of the light sources, so that the connecting line of each target point and the light source can be used as one irradiation light emitted by the light source, and thus compensation simulation can be performed on the basis of the above, wherein the light source irradiates the first area and cannot be blocked by the supporting plate on the fruit tray, only the irradiation angles of the light rays are different, so that the thickness compensation of the area can be performed based on the irradiation angles of the light sources of the first target points in the first area, and the light source irradiates the second area and can be blocked by the supporting plate, so that the calculation of the irradiation angles of the light sources of the second target points in the second area and the penetration distances of the light rays emitted by the light sources on the corresponding supporting plate when the light sources irradiate the second target points are needed, and the thickness compensation of the second area is performed based on the two parameters.
Through the design, the thickness compensation value of each point on the surface of the different areas can be calculated based on the generation factors of the superposition shadows in the different areas according to the different areas of the fruit tray.
In one possible design, based on the light source irradiation included angle of each second target point, obtaining the light source penetration distance corresponding to each second target point includes:
calculating the connecting line between each second target point and the light source according to the light source irradiation included angle of each second target point and the included angle between the connecting line and the supporting plate penetrated by the connecting line to serve as the light source penetration included angle of each second target point;
and obtaining the light source penetration distance of each second target point based on the light source penetration included angle of each second target point and the parameter information.
Based on the above disclosure, the present invention discloses a specific calculation process of the light source penetration distance, namely, firstly, calculating an included angle between a connecting line between a light source and a second target point and a corresponding supporting plate by using the light source irradiation included angle, and then, obtaining the light source penetration distance of the second target point by using the included angle and the thickness of the supporting plate.
In one possible design, calculating, according to the light source irradiation angle of each second target point, an angle between a connecting line between each second target point and the light source and a supporting plate through which the connecting line passes, including:
Acquiring the inclination angle of a supporting plate penetrated by the connecting line based on the connecting line between each second target point and the light source, and taking the inclination angle as the penetrating distance calculation angle of each second target point;
calculating the difference between the light source irradiation included angle of each second target point and the penetration distance calculation angle of each second target point to obtain an included angle calculation value of each second target point;
calculating the absolute value of the difference between the calculated value of the included angle of each second target point and 90 degrees to obtain the light source penetrating included angle of each second target point;
Correspondingly, based on the light source penetration included angle of each second target point and the parameter information, obtaining the light source penetration distance of each second target point comprises the following steps:
based on the connecting line between each second target point and the light source, acquiring the thickness of the supporting plate penetrated by the connecting line as a first calculated value of each second target point;
Calculating a sine value of a light source penetrating included angle of each second target point to serve as a second calculated value of each second target point;
And calculating the quotient of the first calculated value and the second calculated value of each second target point to obtain the light source penetration distance of each second target point.
In one possible design, obtaining the thickness compensation value of each first target point based on the light source irradiation included angle of each first target point includes:
acquiring an initial thickness value of a chassis in the fruit tray;
calculating the cosine value of the light source irradiation included angle of each first target point to serve as a first compensation value of each first target point;
Calculating the quotient of the initial thickness value and each first compensation value to obtain a thickness compensation value of each first target point;
correspondingly, based on the light source penetration distance corresponding to each second target point, obtaining a thickness compensation value of each second target point comprises the following steps:
And calculating the difference value of the initial thickness value and the light source penetration distance of each second target point to obtain a thickness compensation value of each second target point.
Based on the above disclosure, the invention discloses a specific calculation process of thickness compensation of two areas, wherein for a first area, only a cosine value of an illumination included angle of a light source of a first target point is calculated, and then the cosine value is divided by an initial thickness value to obtain thickness compensation values of all the first target points; and for the second area, the penetration distance is obtained based on the light source irradiation included angle of the second target point, so that the thickness compensation value of the second target point can be obtained by subtracting the corresponding light source penetration distance on the basis of the original thickness.
In one possible design, the method further comprises:
Judging whether the fruit tray has void compensation and critical compensation according to the chassis coordinate information and the light source coordinate information, wherein the void compensation is used for representing a connecting line between any one or more second target points and a light source, no intersection point exists between the void compensation and a plane where each supporting plate and the reinforcing plate are located, and the critical compensation is used for representing a connecting line between any one or more second target points and the light source, and an intersection point exists between the void compensation and any edge line of the plane where any supporting plate and/or the reinforcing plate are located;
And if the jump blank compensation exists, obtaining a jump blank compensation value of the chassis based on the thickness compensation value of each first target point, and if the critical compensation exists, obtaining a critical compensation value of the chassis based on the thickness compensation value of each second target point.
Based on the above disclosure, the present invention discloses two other compensation cases, namely, because there is a gap between the support plates, the light source directly irradiates the second area through the gap between the support plates, so that compensation is required in this case, wherein the calculation method of the jump empty compensation value of each target point in the second area on the chassis is the same as the calculation method of the thickness compensation value of the first target point; meanwhile, the situation that the light is just shielded by the supporting plate or the reinforcing plate exists, the situation is critical compensation, and the corresponding compensation value is the thickness compensation value of the second target point; through the design, thickness compensation under different conditions can be realized.
In one possible design, if the number of fruit trays is greater than 1, the method further comprises:
a. Judging whether a connecting line of any second target point and a light source passes through 2 or more support plates in a plurality of second target points on any fruit tray for two or more adjacent fruit trays;
b. If so, adjusting the placement angle of each fruit tray so as to enable the supporting plates between two or more adjacent fruit trays to be staggered, and repeating the step a after each adjustment until the connecting line of each second target point on any fruit tray and the light source only passes through one supporting plate, so as to obtain the final placement angle of each fruit tray.
In one possible design, if adjusting the placement angle of each fruit tray fails to satisfy that the line connecting each second target point on any fruit tray and the light source passes through only one support plate, the method further includes:
c. Reducing the widths of all the support plates on each fruit tray according to a first preset threshold value to obtain a first new fruit tray;
d. judging whether the width of all the supporting plates on each first new fruit tray is larger than or equal to the minimum width value;
e. If yes, judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any first new fruit tray;
f. if yes, repeating the step b;
g. If the arrangement angle of each first new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, repeating the steps c-f until the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray and the corresponding arrangement angle under the optimal width.
In one possible design, the method further comprises:
h. if the width of all the supporting plates on each first new fruit tray is smaller than the minimum width value, reducing the number of the supporting plates on each first new fruit tray according to a second preset threshold value to obtain a second new fruit tray;
i. Judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any second new fruit tray;
j. If yes, repeating the step b;
k. If the arrangement angle of each second new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, repeating the steps h-j until the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray, the corresponding optimal number under the optimal width and the arrangement angle.
Based on the foregoing disclosure, the present invention provides a compensation method under a plurality of trays, that is, when a plurality of trays exist, adjacent trays will affect each other, so that the adjacent trays can be rotated first, thereby adjusting the placement angle of the trays, and making the support plates of the respective trays dislocate each other, so as to avoid cross-over effect; if the cross influence is not avoided all the time, the width of each supporting plate on the tray needs to be reduced, then whether the cross influence exists is judged again, if so, the tray is continuously rotated until the connecting line of each second target point on any fruit tray and the light source only passes through one supporting plate, and at the moment, the optimal width and the final placement angle of the supporting plates on the tray can be obtained; meanwhile, if the rotary tray still cannot avoid the cross influence after the width is reduced, the width of the support plate is reduced again, and the process is repeated; if the width of the supporting plate is reduced to the minimum width, the cross influence still cannot be avoided, at this time, the number of the supporting plates needs to be reduced, whether the cross influence is avoided is judged again, if the cross influence is still unavoidable, the placement angle is adjusted again, and the cycle is adopted, if the number of the supporting plates still cannot be avoided after the number is reduced, the number of the supporting plates is reduced again, and the steps h-j are repeated until the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, and at this time, the optimal width of each supporting plate, the corresponding optimal number under the optimal width and the placement angle can be obtained; through the design, the adjustment of the lower positions of the trays, the width of the supporting plates and the number of the supporting plates can be realized, so that the cross influence of the trays is avoided.
In one possible design, the method further comprises:
if the light source is not vertical to the center of the chassis, acquiring the coordinate of the light source when the light source is not vertical to the center of the chassis;
calculating a new light source irradiation included angle of each first target point and a new light source irradiation included angle of each second target point based on the coordinates of the light source when the light source is not perpendicular to the center of the chassis and the chassis coordinate information;
If the new light source irradiation included angle of the z second target point in the plurality of second target points is larger than the inclination angle of any supporting plate, calculating the light source penetration distance corresponding to the z second target point by using the following formula (1);
In the above formula (1), L z represents the light source penetration distance corresponding to the Z-th second target point, M z represents the thickness of the support plate through which the line between the Z-th second target point and the light source passes, β z represents the light source penetration angle corresponding to the Z-th second target point, and β z=90°+θ-αz ', wherein θ represents the inclination angle of any support plate, α z' represents the new light source irradiation angle of the Z-th second target point, and z=1, 2.
If the new light source irradiation included angle of the z second target point in the plurality of second target points is smaller than or equal to the inclination angle of any one of the supporting plates, calculating the light source penetration distance corresponding to the z second target point by using the following formula (2):
In the above formula (2), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-αz';
If the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is smaller than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (3):
In the above formula (3), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ+αz';
If the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is greater than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (4):
In the above formula (4), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-αz'.
Based on the above disclosure, there is also a case when the light source is not perpendicular to the center of the chassis, so that according to the calculated light source irradiation angle of each target point and the size between the inclination angles of the support plate, the corresponding light source penetration distance calculation formulas under different size relationships can be selected, so as to realize thickness compensation of the second region under the non-perpendicular setting of the light source at different angles.
In one possible design, the method further comprises:
If the light source is a mobile light source, obtaining the mobile coordinates of the mobile light source each time;
According to the chassis coordinate information and the moving coordinates, recalculating a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point;
Obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point;
and obtaining thickness compensation values of all the first target points of the mobile light source after each movement based on the light source irradiation included angle of each first target point, and obtaining thickness compensation values of all the second target points of the mobile light source after each movement based on the light source penetration distance corresponding to each second target point, so that after each movement of the mobile light source, the thickness compensation of the chassis is completed according to the thickness compensation values of all the first target points and the thickness compensation values of all the second target points.
Based on the above disclosure, there is also a situation that the position of the light source is not fixed, that is, the light source is moved, at this time, the moving coordinate of the light source can be obtained each time, and then the same method is used to calculate the light source irradiation included angle and the light source penetration distance corresponding to each target point each time when moving, so as to complete the thickness compensation of the chassis each time moving.
In a second aspect, the present invention provides a thickness compensation device for fruit trays, comprising:
The fruit tray comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring parameter information, chassis coordinate information and light source coordinate information of a fruit tray, wherein a light source of the fruit tray is positioned right above the center of a chassis, the parameter information comprises the thickness of each supporting plate and the inclination angle of each supporting plate, the chassis coordinate information comprises a plurality of first target point coordinates and a plurality of second target point coordinates, the first target points are all points forming the surface of a first area, and the second target points are all points forming the surface of a second area;
The first calculating unit is used for obtaining a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point according to the chassis coordinate information and the light source coordinate information, wherein the light source irradiation included angle of each first target point is a connecting line of each first target point and the light source and an included angle between the light source irradiation included angle of each second target point and a light source vertical line, the light source irradiation included angle of each second target point is a connecting line of each second target point and the light source and an included angle between the light source vertical line and the light source vertical line, and the light source vertical line is a connecting line between the light source and the chassis center;
The second calculation unit is used for obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point, wherein the light source penetration distance corresponding to each second target point is the penetration distance of a connecting line between each second target point and the light source on a corresponding target supporting plate, and the target supporting plate is a supporting plate through which the connecting line between each second target point and the light source passes;
The compensating unit is used for obtaining a thickness compensation value of each first target point based on the light source irradiation included angle of each first target point and obtaining a thickness compensation value of each second target point based on the light source penetration distance corresponding to each second target point so as to finish thickness compensation of the chassis according to the thickness compensation value of each first target point and the thickness compensation value of each second target point.
In a third aspect, the present invention provides another thickness compensation device for fruit trays, taking the device as an electronic device as an example, including a memory, a processor and a transceiver, which are sequentially communicatively connected, where the memory is configured to store a computer program, the transceiver is configured to send and receive a message, and the processor is configured to read the computer program, and execute a thickness compensation method for the fruit tray as in the first aspect or any one of the first aspect and the second aspect.
In a fourth aspect, the present invention provides a storage medium having instructions stored thereon which, when executed on a computer, perform a method of thickness compensation for the fruit tray as may be devised in the first aspect or any one of the first aspects.
In a fifth aspect, the present invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of thickness compensation of a fruit tray as in the first aspect or any one of the possible designs of the first aspect.
Drawings
Fig. 1 is a schematic flow chart of steps of a thickness compensation method of a fruit tray according to the present invention;
Fig. 2 is a schematic structural view of a fruit tray provided by the present invention;
FIG. 3 is a schematic diagram of compensation calculation according to the present invention;
FIG. 4 is a schematic view of a plurality of fruit trays provided by the present invention;
FIG. 5 is a schematic diagram of compensation under a non-vertical light source according to the present invention;
Fig. 6 is a schematic structural view of a thickness compensation device of a fruit tray provided by the invention;
Fig. 7 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
The invention will be further elucidated with reference to the drawings and to specific embodiments. The present invention is not limited to these examples, although they are described in order to assist understanding of the present invention. Specific structural and functional details disclosed herein are merely representative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that for the term "and/or" that may appear herein, it is merely one association relationship that describes an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a alone, B alone, and both a and B; for the term "/and" that may appear herein, which is descriptive of another associative object relationship, it means that there may be two relationships, e.g., a/and B, it may be expressed that: a alone, a alone and B alone; in addition, for the character "/" that may appear herein, it is generally indicated that the context associated object is an "or" relationship.
Examples
Referring to fig. 1, the thickness compensation method for a fruit tray according to the first aspect of the present embodiment may implement thickness compensation of a bottom plate on the fruit tray, so that the fruit tray after thickness compensation eliminates overlapped shadows on fruits, so as to avoid the problem that the spatial three-dimensional structure, thickness and density of the tray itself affect fruit images during shooting, where the foregoing compensation method may be, but is not limited to, running on a compensation terminal side or a server side, and the compensation terminal may be, but is not limited to, a personal computer (personal computer, PC), a tablet computer, a smart phone, a personal digital assistant (personal DIGITAL ASSISTANT, PDA), etc., and it is to be understood that the foregoing execution subject does not limit the embodiments of the present application, and accordingly, the running steps of the method are shown in the following steps S1 to S4.
In a specific application, a specific structure of the fruit tray is described first, referring to fig. 2, an example of the fruit tray includes a chassis 10 and a plurality of support plates 20, the plurality of support plates 20 are uniformly arranged around the center of the chassis 10, wherein the plurality of support plates 20 form a truncated cone shape with a diameter gradually increasing from bottom to top, and a reinforcing plate 30 is disposed between two adjacent support plates 20; meanwhile, the chassis 10 includes a first area 11 and a second area 12, where the thickness of the first area 11 gradually decreases from the center to the edge of the first area 11, the thickness of the second area 12 gradually increases from the center to the edge of the second area 12, the first area 11 is an area surrounded by the plurality of support plates 20 on the chassis, and the second area 12 is an area on the chassis from which all areas outside the first area 11 are removed.
Alternatively, for example, the inclination angles of the support plates 20 are the same, and preferably 4 support plates 20 are provided on the base plate 20, however, the number and width of the support plates 20 may be set according to the kinds of fruits, and are not limited to the foregoing examples.
In this embodiment, the method provided in this embodiment calculates thickness compensation values of different points in the first area 11 and the second area 12 according to different situations, so as to remanufacture the bottom tray of the fruit tray according to the thickness compensation values, so as to eliminate the overlapping shadows of the fruit tray on shooting.
Specifically, the following steps S1 to S4 are compensation methods when the support plate blocks all the light rays emitted from the light source, as follows:
S1, acquiring parameter information, chassis coordinate information and light source coordinate information of a fruit tray, wherein a light source of the fruit tray is positioned right above the center of a chassis, the parameter information comprises thickness of each supporting plate and inclination angle of each supporting plate, the chassis coordinate information comprises a plurality of first target point coordinates and a plurality of second target point coordinates, the first target points are all points forming the surface of a first area, and the second target points are all points forming the surface of a second area.
In specific application, the two areas of the fruit tray are simplified into one curved surface, wherein each curved surface is formed by a plurality of target points, so that a connecting line between each target point and the light source can represent one light ray emitted by the light source, and therefore, simulation compensation can be performed based on the connecting line between each target point and the light source, and a thickness compensation value corresponding to each target point is calculated; optionally, the foregoing information may be preset in the compensation terminal.
For the first area, the light source irradiates the area and cannot be blocked by the supporting plate on the fruit tray, namely, the shadow is generated because the light source irradiates angles, so that the thickness compensation of the area can be performed based on the light source irradiates included angles of all the first target points in the first area, and for the second area, the light source irradiates and is blocked by the supporting plate, so that the light source irradiates included angles of all the second target points in the second area and the penetrating distance of the light rays emitted by the light source on the corresponding supporting plate when the light rays irradiate on all the second target points need to be calculated, and the thickness compensation of the second area is performed based on the two parameters; specifically, the calculation of the illumination angle of the light source is shown in step S2.
S2, obtaining a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point according to the chassis coordinate information and the light source coordinate information, wherein the light source irradiation included angle of each first target point is an included angle between a connecting line of each first target point and a light source vertical line, the light source irradiation included angle of each second target point is an included angle between a connecting line of each second target point and the light source and a light source vertical line, and the light source vertical line is a connecting line between the light source and the chassis center.
The following specific calculation process is described by taking the included angle of illumination of any light source of the second target point as an example:
Referring to fig. 3, a point a in fig. 3 represents the center of the chassis, which belongs to one of a plurality of first target points, a point B in fig. 3 is any second target point, namely, a second area 12 of the area where the point B is located, an area surrounded by the support plate 20 is a first area 11, wherein a point C is a light source, BC represents a connection line between any second target point and the light source, and AC represents a light source vertical line, so three line segments AB, AC and BC form a right triangle ABC, and a light source irradiation angle of any second target point is an angle ACB, after knowing coordinates of the point C (i.e., light source coordinate information), coordinates of the point a and coordinates of the point B, lengths of the line segments BC and AC can be obtained, and finally, based on the lengths of the line segments BC and AC, a value of the angle ACB can be obtained by using an inverse trigonometric function, namely, the light source irradiation angle of any second target point; similarly, for the other second target points and the light source irradiation angles of the first target points, the calculation process is consistent with the foregoing examples, and will not be repeated here.
Since the foregoing has described that the light source is blocked by the support plate if it irradiates each second target point in the second area, it is also necessary to calculate the penetration distance of the light beam irradiated onto the second target point if it irradiates each second target point in the second area, that is, the following step S3 is a process of calculating the penetration distance of the light source.
S3, obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point, wherein the light source penetration distance corresponding to each second target point is the penetration distance of a connecting line between each second target point and the light source on a corresponding target supporting plate, and the target supporting plate is a supporting plate through which the connecting line between each second target point and the light source passes; in particular, when the light source is used, any line between the second target point and the light source passes through a support plate, so that the passed support plate is the target support plate, and optionally, the calculation process of the light source penetration distance may be, but is not limited to, as shown in the following steps S31 and S32.
S31, calculating a connecting line between each second target point and the light source according to the light source irradiation included angle of each second target point, and an included angle between the connecting line and a supporting plate penetrated by the connecting line to serve as a light source penetration included angle of each second target point; referring to fig. 3, an angle β in fig. 3 indicates a light source penetration angle of any second target point B, and a support plate through which the line segment BC passes is a target support plate; in a specific application, the calculation process of the light source penetration angle is shown in the following steps S311 to S313.
S311, acquiring the inclination angle of a supporting plate penetrated by the connecting line based on the connecting line between each second target point and the light source, and taking the inclination angle as the penetration distance calculation angle of each second target point; in the present embodiment, the respective support plate inclination angles may be acquired based on the parameter information.
S312, calculating the difference value between the light source irradiation included angle of each second target point and the penetration distance calculation angle of each second target point to obtain the included angle calculation value of each second target point.
S313, calculating the absolute value of the difference between the calculated value of the included angle of each second target point and 90 degrees to obtain the light source penetrating included angle of each second target point.
The following describes, as an example, a specific calculation of the light source penetration angle β:
Taking any second target point B as an example to describe the light source penetration angle of the second target point, referring to fig. 3, assuming that the intersection point of the supporting plate penetrated by the line segment BC and the chassis 20 is the point D, the intersection point of the line segment BC and the supporting plate is the points E and F, so that in fig. 3, there are two triangles, one is a right triangle ABC, the other is an acute triangle EDB, and the light source penetration angle of any second target point B is the vertex angle of the triangle EDB (i.e., angle DEB, β in fig. 3), in the triangle EDB, angle ebd=90-angle ACB (i.e., α in fig. 3), and angle BDE is the inclination angle (θ) of the supporting plate penetrated by BC, so that angle β=180 ° - θ - (90 ° - α) =90 ° - (θ - α), i.e., θ - α is the calculated value of the included angle in step S312; similarly, the calculation process of the light source penetration angles of the other second target points is the same as that of the foregoing example, and will not be repeated here.
After obtaining the light source penetration angle of each second target point, the light source penetration distance of each second target point can be calculated, as shown in step S32 below.
S32, obtaining the light source penetration distance of each second target point based on the light source penetration included angle of each second target point and the parameter information; in a specific application, the calculation process of the light source penetration distance is as follows steps S321 to S323.
S321, based on the connecting line between each second target point and the light source, acquiring the thickness of the supporting plate penetrated by the connecting line as a first calculated value of each second target point.
S322, calculating a sine value of the light source penetration included angle of each second target point to serve as a second calculated value of each second target point.
S323, calculating the quotient of the first calculated value and the second calculated value of each second target point to obtain the light source penetration distance of each second target point.
The following is also an example of any of the second target points B to illustrate the steps S321 to S323:
Referring to fig. 3, the connection line between any second target point B and the light source is a line segment BC, and the corresponding target support plate is the support plate through which the line segment BC passes, i.e. the support plate V in fig. 3, wherein the corner points of the line segment BC and the support plate V are the E point and the F point, and EF is the light source penetration distance of any second target point B, so that the intersection point between the lead line from the F point and the support plate V is the G point, i.e. a right triangle EFG can be formed, and meanwhile, the angle FEG and the angle β are opposite corners, sinβ=fg/EF, thereby, ef=fg/sinβ, and FG is the thickness of the support plate V, which can be obtained from parameter information, and therefore, after calculating the light source penetration angle, the light source penetration distance of any second target point B can be obtained by combining the thickness of the support plate. Of course, the calculation process of the light source penetration distance of each of the other second target points is identical to the foregoing example, and will not be repeated here.
After obtaining the light source irradiation angles of the first target points and the light source penetration distances of the second target points, the thickness compensation can be performed on the first area and the second area, as shown in step S4 below.
S4, obtaining a thickness compensation value of each first target point based on the light source irradiation included angle of each first target point, and obtaining a thickness compensation value of each second target point based on the light source penetration distance corresponding to each second target point, so as to complete thickness compensation of the chassis according to the thickness compensation value of each first target point and the thickness compensation value of each second target point; in specific application, the compensation process of the first region is as follows steps S41 to S43.
S41, acquiring an initial thickness value of a chassis in the fruit tray; in a specific application, the initial thickness value is preset by a user.
S42, calculating the cosine value of the light source irradiation included angle of each first target point to serve as a first compensation value of each first target point.
S43, calculating the quotient of the initial thickness value and each first compensation value to obtain the thickness compensation value of each first target point.
The following summarizes the foregoing steps S41 to S43 as a formula:
Yp=Y0/cosαp (5)
In the above formula (5), Y p represents the thickness compensation value of the P-th first target point, Y 0 represents the initial thickness value, cos α p represents the first compensation value of the P-th first target point, α p represents the light source irradiation angle of the P-th first target point, and p=1, 2.
Similarly, for the calculation of the thickness compensation value of each second target point, as shown in the following step S44:
S44, calculating the difference value of the initial thickness value and the light source penetration distance of each second target point to obtain a thickness compensation value of each second target point; similarly, step S44 is summarized by a formula as shown in the following formula (6):
T=Y0-Lz (6)
in the above formula (6), T z represents the thickness compensation value of the Z-th second target point, L z represents the light source penetration distance of the Z-th second target point, and z=1, 2.
After the thickness compensation values of the first target point and the second target point are obtained, the thicknesses of the first area and the second area can be obtained according to the thickness compensation values corresponding to the target points so as to remanufacture the chassis, thereby obtaining the fruit tray capable of eliminating the overlapped shadows.
Through the design, the thickness compensation value of each point on the surface of the different areas can be calculated based on the generation factors of the superposition shadows in the different areas according to the different areas of the fruit tray.
In a possible design, the second aspect of the present embodiment provides, on the basis of the first aspect, a compensation method in which light emitted from the light source irradiates onto the second area from the gap between adjacent support plates or the gap between the reinforcing plates, and a compensation method in which light emitted from the light source is just blocked by the support plates or the reinforcing plates, as shown in step S5 and step S6 below.
S5, judging whether the fruit tray has void compensation and critical compensation according to the chassis coordinate information and the light source coordinate information, wherein the void compensation is used for representing a connecting line between any one or more second target points and the light source, no intersection point exists between the void compensation and a plane where each supporting plate and the reinforcing plate are located, and the critical compensation is used for representing a connecting line between any one or more second target points and the light source, and an intersection point exists between the critical compensation and any edge line of the plane where any supporting plate and/or the reinforcing plate are located.
When the method is specifically applied, the condition that light rays emitted by the light source irradiate to the second area from the gap of the adjacent supporting plate or the gap of the adjacent reinforcing plate is called as jump blank compensation, wherein the judging method is as follows: acquiring coordinates of all points on each surface forming each supporting plate, then acquiring plane equations of all surfaces on each supporting plate, then acquiring a straight line equation corresponding to a connecting line of any second target point and a light source by using the coordinates of any second target point and the coordinate information of the light source, and finally judging whether an intersection point exists between a straight line and any surface by using the straight line equation and the plane equation of each surface, if not, indicating that the jump-over compensation exists, otherwise, not exists; similarly, for critical compensation, the same method is adopted to obtain the linear equation of the edge of each surface of any support plate and/or reinforcing plate, then the linear equation corresponding to the line of any target point and the light source is utilized to judge whether the intersection point exists between the line of any target point and the light source and the edge line of each surface, if so, the critical compensation exists, or else, the critical compensation does not exist.
Of course, the coordinates of all points on each surface of each support plate can be obtained according to three-dimensional modeling, and can also be obtained based on point cloud data by shooting three-dimensional images of fruit trays.
After judging whether the fruit tray has the jump blank compensation and the critical compensation based on the above method, the corresponding thickness compensation can be performed, as shown in step S6 below.
S6, if the jump blank compensation exists, obtaining a jump blank compensation value of the chassis based on the thickness compensation value of each first target point, and if the critical compensation exists, obtaining a critical compensation value of the chassis based on the thickness compensation value of each second target point; when the method is specifically applied, the jump blank compensation value of the chassis is the jump blank compensation value of each second target point in the second area, and the calculation formula of the value is as follows: r z=Y0/cosαz, wherein r z represents a jump blank compensation value of the z second target point, and the light source irradiation included angle of the z second target point of alpha z; the critical compensation value of the chassis is also the jump blank compensation value of each second target point in the second area, and the jump blank compensation value is equal to the thickness compensation value of each second target point.
Therefore, through the design, thickness compensation under different conditions can be realized, and the adaptability of the fruit tray is improved.
In one possible design, referring to fig. 4, in a third aspect of the present embodiment, on the basis of the first aspect of the embodiment, there is provided a thickness compensation method when there are a plurality of fruit trays, wherein when there are a plurality of fruit trays, two or more adjacent fruit trays have a cross influence, that is, the light source irradiates the second area on one fruit tray, and passes through 2 or more support plates, so that cross compensation is required, as shown in the following steps a to k.
If the number of fruit trays is greater than 1, the method further comprises:
a. judging whether a connecting line of any second target point and a light source passes through 2 or more support plates in a plurality of second target points on any fruit tray for two or more adjacent fruit trays; when the method is specifically applied, the principle is the same as that of the judging method of the jump blank compensation, namely, whether the connecting line and each surface of the supporting plate have an intersection point is judged by utilizing a straight line equation corresponding to the connecting line of the second target point and the light source and a plane equation of each surface of the supporting plate, and if the connecting line and any plane have the intersection point, the connecting line passes through the supporting plate is explained; and similarly, judging all the support plates on the adjacent fruit trays by adopting the same method, so as to obtain the aim of judging whether the connecting line of any second target point and the light source passes through 2 or more than 2 support plates.
If so, the placement angle of each fruit tray needs to be adjusted, as shown in step b below.
B. If so, adjusting the placement angle of each fruit tray so that the support plates between two or more adjacent fruit trays are staggered, and repeating the step a after each adjustment until the connecting line of each second target point on any fruit tray and the light source only passes through one support plate, so as to obtain the final placement angle of each fruit tray; in specific application, referring to fig. 4, taking the fruit tray 5 in fig. 4 as an example, 2 fruit trays are adjacent to each other, that is, 3 fruit trays are totally installed, at this time, 3 fruit trays are required to be rotated (angle values of each rotation can be preset), so as to adjust the placement angles of the three fruit trays, so that the support plates on the 3 fruit trays are all dislocated with each other, and simultaneously record the rotation angles, then, whether any second target point and the connecting line of the light source pass through 2 or more support plates is determined again, if any second target point and the connecting line of the light source pass through 2 or more support plates, then, the second target point and the connecting line of the light source on any fruit tray are determined again until only pass through one support plate, at this time, the total rotation angle of the three fruit trays can be obtained, so as to obtain the placement angle of each fruit tray, and the cross compensation method of other adjacent fruit trays is consistent with the foregoing example, which is not repeated.
In this embodiment, three-dimensional modeling can be performed, and angle adjustment for the fruit tray can be realized by simulation, so that a final placement angle is obtained.
In this embodiment, if the arrangement angle of each fruit tray is adjusted so as not to satisfy that the line between each second target point on any fruit tray and the light source passes through only one support plate, the method further includes the following steps c-g.
C. and reducing the widths of all the supporting plates on each fruit tray according to a first preset threshold value to obtain a first new fruit tray.
D. judging whether the width of all the supporting plates on each first new fruit tray is larger than or equal to the minimum width value;
e. If yes, judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any first new fruit tray;
f. if yes, repeating the step b;
g. If the arrangement angle of each first new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, repeating the steps c-f until the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray and the corresponding arrangement angle under the optimal width.
The foregoing description is also based on the foregoing example, assuming that the foregoing fruit tray 5 and two adjacent fruit trays rotate in any way, it is not possible to satisfy the requirement that the line connecting each second target point on any one fruit tray with the light source passes through only one support plate, at this time, the width of the support plate needs to be reduced, for example, the first preset threshold is 1cm, that is, each support plate is reduced by 1cm, and then three first new fruit trays are obtained, at this time, it is determined whether the width of the support plate on each first new fruit tray is greater than or equal to the minimum width value, if yes, it is determined again whether the line connecting any second target point with the light source passes through 2 or more support plates, if yes, it is necessary to rotate three first new fruit trays, thereby adjusting the placement angle of three fruit trays, if three first new fruit trays still cannot satisfy the requirement that the line connecting each second target point on any one first fruit tray with the light source passes through only one support plate, at this time, the thickness of each support plate is reduced again by 1cm, and it is determined whether the width of the support plate is greater than or equal to the minimum width value, at this time, the line connecting any first new fruit tray with the first target point with the light source passes through only one new support plate, and the three new fruit trays can be placed until the angle is reached.
Similarly, if the width of all the support plates on each first new fruit tray is smaller than the minimum width value, the following steps h to k are required.
H. And reducing the number of the supporting plates on each first new fruit tray according to a second preset threshold value to obtain a second new fruit tray.
I. Judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any second new fruit tray.
J. If yes, repeating the step b.
K. If the arrangement angle of each second new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, repeating the steps h-j until the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray, the corresponding optimal number under the optimal width and the arrangement angle.
The steps h to k are also described on the basis of the examples given above:
If the widths of the support plates on the three fruit trays are reduced by 3cm (1 cm), the corresponding widths are smaller than the minimum width value, that is, the steps c-g are repeated three times, and the connection line between each second target point on any one second new fruit tray and the light source still does not meet the requirement of only passing through one support plate, at this time, the reduction of the widths cannot be performed any more, so that the number of support plates on the first new fruit tray needs to be reduced, that is, the number of support plates is reduced on the basis that the widths of the support plates are 1 cm; meanwhile, if the second preset threshold value is 1,1 supporting plate is reduced each time to obtain three second new fruit trays, then, whether any connecting line of the second target point and the light source on the three second new fruit trays passes through 2 or more supporting plates needs to be judged, if so, the three second new fruit trays need to be rotated, so that the placing angles of the three second new fruit trays are adjusted, if the three second new fruit trays are rotated, the connecting line of each second target point on any first new fruit tray and the light source still cannot be met, only one supporting plate passes through, at the moment, for each second new fruit tray, one supporting plate is reduced again, and the steps h-j are repeated until the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, and after the circulation is finished, the optimal width, the corresponding optimal number and placing angle of the supporting plates on each new fruit tray can be obtained.
Therefore, through the design, when a plurality of trays exist, the adjustment of the positions of the trays, the widths of the supporting plates and the number of the supporting plates can be realized, so that the cross influence of the plurality of trays is avoided.
In one possible design, referring to fig. 5, in a fourth aspect of the present embodiment, a thickness compensation method when the light source is not perpendicular to the chassis center is provided on the basis of the first aspect of the embodiment, as shown in steps S7 to S9 below.
S7, if the light source is not vertical to the center of the chassis, acquiring the coordinate of the light source when the light source is not vertical to the center of the chassis; in this embodiment, the user also presets the simulation light source to the compensation terminal, i.e. the simulation light source is not directly above the center of the chassis.
S8, calculating a new light source irradiation included angle of each first target point and a new light source irradiation included angle of each second target point based on the coordinates of the light source when the light source is not perpendicular to the center of the chassis and the chassis coordinate information; in particular, the calculation principle of step S8 is the same as that of step S2, and the calculation process listed in step S2 can be referred to.
Referring to fig. 5, when the light source is not perpendicular to the chassis center, there are 4 cases, namely, the following four:
Referring to reference numeral 1 in fig. 5, reference numeral 1 refers to: if the new light source irradiation included angle of the z second target point in the plurality of second target points is larger than the inclination angle of any support plate, calculating the light source penetration distance corresponding to the z second target point by using the following formula (1):
In the above formula (1), L z represents the light source penetration distance corresponding to the Z second target point, M z represents the thickness of the support plate through which the line between the Z second target point and the light source passes, β z represents the light source penetration angle corresponding to the Z second target point, and β z=90°+θ-αz ', where θ represents the inclination angle of any support plate, α z' represents the new light source irradiation angle of the Z second target point, and z=1, 2.
Referring to reference numeral 2 in fig. 5, reference numeral 2 refers to: if the new light source irradiation included angle of the z second target point in the plurality of second target points is smaller than or equal to the inclination angle of any one of the supporting plates, calculating the light source penetration distance corresponding to the z second target point by using the following formula (2):
In the above formula (2), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-αz'.
Referring to reference numeral 3 in fig. 5, reference numeral 3 refers to: if the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is smaller than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (3):
In the above formula (3), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ+αz'.
Referring to reference numeral 4 in fig. 5, reference numeral 4 refers to: if the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is greater than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (4):
In the above formula (4), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-αz'.
Of course, after obtaining the light source penetration distances of the respective second target points in the aforementioned 4 different situations, the calculation process of the thickness compensation value of the respective first target points and the thickness compensation value of the respective second target points is the same as the principle of the aforementioned step S4 and the sub-steps thereof, and will not be repeated herein.
Through the design, the corresponding light source penetration distance calculation formula under different size relations can be selected according to the calculated light source irradiation included angle of each target point and the size between the light source irradiation included angle and the inclination angle of the supporting plate, so that thickness compensation of the second area under the condition that the light sources are not vertically arranged and at different angles is realized.
In a possible design, the fifth aspect provides, on the basis of the first aspect of the embodiment, a thickness compensation method when the light source is a moving light source, as follows steps S9 to S12.
S9, if the light source is a mobile light source, obtaining the mobile coordinates of the mobile light source each time; in a specific application, the moving coordinates of the moving light source are preset to the compensation terminal by the user, namely different coordinates are input to identify the moving position of the moving light source each time.
S10, recalculating the light source irradiation included angle of each first target point and the light source irradiation included angle of each second target point according to the chassis coordinate information and the moving coordinates.
S11, obtaining the light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point.
S12, obtaining thickness compensation values of all first target points of the mobile light source after each movement based on the light source irradiation included angle of each first target point, and obtaining thickness compensation values of all second target points of the mobile light source after each movement based on the light source penetration distance corresponding to each second target point, so that after each movement of the mobile light source, thickness compensation of the chassis is completed according to the thickness compensation values of all first target points and the thickness compensation values of all second target points.
In the present embodiment, the calculation process of steps S10 to S12 is the same as the calculation process of steps S2 to S4, and reference may be made to the steps S2 to S4 and each sub-step, which are not described herein.
Through the design, the thickness compensation value of each target point in the first area and the second area on the chassis after each movement can be obtained when the light source moves each time, so that the compensation of the fruit tray under the moving light source is satisfied; furthermore, for the moving light source, the bottom plate of the fruit tray can be an inflatable bottom plate and can be divided into a plurality of inflatable areas, so that after the light source moves, the thickness of the first area and the thickness of the second area can be adjusted through the inflation amount.
As shown in fig. 6, a sixth aspect of the present embodiment provides a hardware device for implementing the thickness compensation method of the fruit tray according to the first aspect, the second aspect, the third aspect, the fourth aspect, or the fifth aspect of the present embodiment, including:
The fruit tray comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring parameter information, chassis coordinate information and light source coordinate information of a fruit tray, wherein a light source of the fruit tray is positioned right above the center of a chassis, the parameter information comprises the thickness of each supporting plate and the inclination angle of each supporting plate, the chassis coordinate information comprises a plurality of first target point coordinates and a plurality of second target point coordinates, the first target points are all points forming the surface of a first area, and the second target points are all points forming the surface of a second area.
The first calculating unit is used for obtaining a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point according to the chassis coordinate information and the light source coordinate information, wherein the light source irradiation included angle of each first target point is a connecting line of each first target point and the light source and an included angle between the light source irradiation included angle of each second target point and a light source vertical line, the light source irradiation included angle of each second target point is a connecting line of each second target point and the light source and an included angle between the light source vertical line, and the light source vertical line is a connecting line between the light source and the chassis center.
The second calculating unit is used for obtaining the light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point, wherein the light source penetration distance corresponding to each second target point is the penetration distance of the connecting line between each second target point and the light source on the corresponding target supporting plate, and the target supporting plate is the supporting plate through which the connecting line between each second target point and the light source passes.
The compensating unit is used for obtaining a thickness compensation value of each first target point based on the light source irradiation included angle of each first target point and obtaining a thickness compensation value of each second target point based on the light source penetration distance corresponding to each second target point so as to finish thickness compensation of the chassis according to the thickness compensation value of each first target point and the thickness compensation value of each second target point.
The working process, working details and technical effects of the hardware device provided in this embodiment may refer to the first aspect, the second aspect, the third aspect, the fourth aspect or the fifth aspect of the embodiments, which are not described herein again.
As shown in fig. 7, a seventh aspect of the present embodiment provides another thickness compensation device for a fruit tray, taking the device as an electronic device, including: the fruit tray thickness compensation method comprises a memory, a processor and a transceiver which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for receiving and transmitting messages, and the processor is used for reading the computer program and executing the fruit tray thickness compensation method according to the first aspect, the second aspect, the third aspect, the fourth aspect and/or the fifth aspect of the embodiment.
By way of specific example, the Memory may include, but is not limited to, random access Memory (random access Memory, RAM), read Only Memory (ROM), flash Memory (Flash Memory), first-in-first-Out Memory (First Input First Output, FIFO) and/or first-in-last-Out Memory (FIRST IN LAST Out, FILO), and the like; in particular, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ), and may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in a wake-up state, and is also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state.
In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen, e.g., the processor may not be limited to a microprocessor of the STM32F105 family, a reduced instruction set computer (reduced instruction set computer, RISC) microprocessor, an X86 or other architecture processor, or a processor that integrates an embedded neural network processor (neural-network processing units, NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a bluetooth wireless transceiver, a General Packet Radio Service (GPRS) wireless transceiver, a ZigBee wireless transceiver (low power local area network protocol based on the ieee802.15.4 standard), a 3G transceiver, a 4G transceiver, and/or a 5G transceiver, etc. In addition, the device may include, but is not limited to, a power module, a display screen, and other necessary components.
The working process, working details and technical effects of the electronic device provided in this embodiment may refer to the second aspect, the third aspect, the fourth aspect and/or the fifth aspect of the embodiment, which are not described herein.
An eighth aspect of the present embodiment provides a storage medium storing instructions comprising the method for thickness compensation of a fruit tray, i.e. instructions stored on the storage medium, which when run on a computer perform the method for thickness compensation of a fruit tray according to the first, second, third, fourth and/or fifth aspects.
The storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, a flash disk, and/or a Memory Stick (Memory Stick), where the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
The working process, working details and technical effects of the storage medium provided in this embodiment may refer to the first aspect, the second aspect, the third aspect, the fourth aspect and/or the fifth aspect of the embodiments, which are not described herein.
A ninth aspect of the present embodiment provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of thickness compensation for fruit trays according to the first to fifth aspects of the embodiments, wherein the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
Finally, it should be noted that: the foregoing description is only of the preferred embodiments of the invention and is not intended to limit the scope of the invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The thickness compensation method of the fruit tray is used for carrying out thickness compensation on the bottom of the fruit tray so as to eliminate the superposition shadow of the fruit tray on the fruit when the fruit is shot, the fruit tray comprises a chassis and a plurality of supporting plates, the plurality of supporting plates are uniformly arranged around the center of the chassis, the plurality of supporting plates form a truncated cone shape with the diameter gradually increasing from bottom to top, and a reinforcing plate is arranged between every two adjacent supporting plates;
The chassis comprises a first area and a second area, wherein the thickness of the first area gradually decreases from the center to the edge of the first area, the thickness of the second area gradually increases from the center to the edge of the second area, the first area is an area surrounded by the plurality of support plates on the chassis, and the second area is an area on the chassis except for the first area, and the method is characterized by comprising the following steps:
acquiring parameter information, chassis coordinate information and light source coordinate information of a fruit tray, wherein a light source of the fruit tray is positioned right above the center of a chassis, the parameter information comprises the thickness of each supporting plate and the inclination angle of each supporting plate, the chassis coordinate information comprises a plurality of first target point coordinates and a plurality of second target point coordinates, the plurality of first target points are all points forming the surface of a first area, and the plurality of second target points are all points forming the surface of a second area;
Obtaining a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point according to the chassis coordinate information and the light source coordinate information, wherein the light source irradiation included angle of each first target point is an included angle between a connecting line of each first target point and a light source vertical line, the light source irradiation included angle of each second target point is an included angle between a connecting line of each second target point and the light source and a light source vertical line, and the light source vertical line is a connecting line between the light source and the chassis center;
Obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point, wherein the light source penetration distance corresponding to each second target point is the penetration distance of a connecting line between each second target point and the light source on a corresponding target supporting plate, and the target supporting plate is a supporting plate through which the connecting line between each second target point and the light source passes;
And obtaining a thickness compensation value of each first target point based on the light source irradiation included angle of each first target point and obtaining a thickness compensation value of each second target point based on the light source penetration distance corresponding to each second target point, so as to complete thickness compensation of the chassis according to the thickness compensation value of each first target point and the thickness compensation value of each second target point.
2. The method of claim 1, wherein obtaining the light source penetration distance corresponding to each second target point based on the light source irradiation angle of each second target point comprises:
calculating the connecting line between each second target point and the light source according to the light source irradiation included angle of each second target point and the included angle between the connecting line and the supporting plate penetrated by the connecting line to serve as the light source penetration included angle of each second target point;
and obtaining the light source penetration distance of each second target point based on the light source penetration included angle of each second target point and the parameter information.
3. The method of claim 2, wherein calculating the angle between the line between each second target point and the light source and the support plate through which the line passes based on the light source illumination angle of each second target point comprises:
Acquiring the inclination angle of a supporting plate penetrated by the connecting line based on the connecting line between each second target point and the light source, and taking the inclination angle as the penetrating distance calculation angle of each second target point;
calculating the difference between the light source irradiation included angle of each second target point and the penetration distance calculation angle of each second target point to obtain an included angle calculation value of each second target point;
calculating the absolute value of the difference between the calculated value of the included angle of each second target point and 90 degrees to obtain the light source penetrating included angle of each second target point;
Correspondingly, based on the light source penetration included angle of each second target point and the parameter information, obtaining the light source penetration distance of each second target point comprises the following steps:
based on the connecting line between each second target point and the light source, acquiring the thickness of the supporting plate penetrated by the connecting line as a first calculated value of each second target point;
Calculating a sine value of a light source penetrating included angle of each second target point to serve as a second calculated value of each second target point;
And calculating the quotient of the first calculated value and the second calculated value of each second target point to obtain the light source penetration distance of each second target point.
4. The method of claim 1, wherein deriving a thickness compensation value for each first target point based on the included angle of illumination of the light source for each first target point comprises:
acquiring an initial thickness value of a chassis in the fruit tray;
calculating the cosine value of the light source irradiation included angle of each first target point to serve as a first compensation value of each first target point;
Calculating the quotient of the initial thickness value and each first compensation value to obtain a thickness compensation value of each first target point;
correspondingly, based on the light source penetration distance corresponding to each second target point, obtaining a thickness compensation value of each second target point comprises the following steps:
And calculating the difference value of the initial thickness value and the light source penetration distance of each second target point to obtain a thickness compensation value of each second target point.
5. The method of claim 1, wherein the method further comprises:
Judging whether the fruit tray has void compensation and critical compensation according to the chassis coordinate information and the light source coordinate information, wherein the void compensation is used for representing a connecting line between any one or more second target points and a light source, no intersection point exists between the void compensation and a plane where each supporting plate and the reinforcing plate are located, and the critical compensation is used for representing a connecting line between any one or more second target points and the light source, and an intersection point exists between the void compensation and any edge line of the plane where any supporting plate and/or the reinforcing plate are located;
And if the jump blank compensation exists, obtaining a jump blank compensation value of the chassis based on the thickness compensation value of each first target point, and if the critical compensation exists, obtaining a critical compensation value of the chassis based on the thickness compensation value of each second target point.
6. The method of claim 1, wherein if the number of fruit trays is greater than 1, the method further comprises:
a. Judging whether a connecting line of any second target point and a light source passes through 2 or more support plates in a plurality of second target points on any fruit tray for two or more adjacent fruit trays;
b. If so, adjusting the placement angle of each fruit tray so as to enable the supporting plates between two or more adjacent fruit trays to be staggered, and repeating the step a after each adjustment until the connecting line of each second target point on any fruit tray and the light source only passes through one supporting plate, so as to obtain the final placement angle of each fruit tray.
7. The method of claim 6, wherein if adjusting the placement angle of each fruit tray fails to satisfy that the line connecting each second target point on any fruit tray with the light source passes through only one support plate, the method further comprises:
c. Reducing the widths of all the support plates on each fruit tray according to a first preset threshold value to obtain a first new fruit tray;
d. judging whether the width of all the supporting plates on each first new fruit tray is larger than or equal to the minimum width value;
e. If yes, judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any first new fruit tray;
f. if yes, repeating the step b;
g. If the arrangement angle of each first new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, repeating the steps c-f until the connecting line of each second target point on any first new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray and the corresponding arrangement angle under the optimal width.
8. The method of claim 7, wherein the method further comprises:
h. if the width of all the supporting plates on each first new fruit tray is smaller than the minimum width value, reducing the number of the supporting plates on each first new fruit tray according to a second preset threshold value to obtain a second new fruit tray;
i. Judging whether a connecting line of any second target point and a light source passes through 2 or more than 2 supporting plates in a plurality of second target points on any second new fruit tray;
j. If yes, repeating the step b;
k. If the arrangement angle of each second new fruit tray cannot be adjusted to meet the requirement that the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, repeating the steps h-j until the connecting line of each second target point on any second new fruit tray and the light source only passes through one supporting plate, so as to obtain the optimal width of the supporting plate on each fruit tray, the corresponding optimal number under the optimal width and the arrangement angle.
9. The method of claim 1, wherein the method further comprises:
if the light source is not vertical to the center of the chassis, acquiring the coordinate of the light source when the light source is not vertical to the center of the chassis;
calculating a new light source irradiation included angle of each first target point and a new light source irradiation included angle of each second target point based on the coordinates of the light source when the light source is not perpendicular to the center of the chassis and the chassis coordinate information;
If the new light source irradiation included angle of the z second target point in the plurality of second target points is larger than the inclination angle of any supporting plate, calculating the light source penetration distance corresponding to the z second target point by using the following formula (1);
in the above formula (1), L z represents the light source penetration distance corresponding to the Z-th second target point, M z represents the thickness of the support plate through which the line between the Z-th second target point and the light source passes, β z represents the light source penetration angle corresponding to the Z-th second target point, and β z=90°+θ-α′z, wherein θ represents the inclination angle of any support plate, α' z represents the new light source irradiation angle of the Z-th second target point, and z=1, 2.
If the new light source irradiation included angle of the z second target point in the plurality of second target points is smaller than or equal to the inclination angle of any one of the supporting plates, calculating the light source penetration distance corresponding to the z second target point by using the following formula (2):
In the above formula (2), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-α′z;
If the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is smaller than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (3):
In the above formula (3), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ+α′z;
If the sum of the new light source irradiation included angle of the z second target point in the plurality of second target points and the inclination angle of any supporting plate is greater than ninety degrees, calculating the light source penetration distance corresponding to the z second target point by using the following formula (4):
In the above formula (4), L z represents the light source penetration distance corresponding to the z second target point, β z represents the light source penetration angle corresponding to the z second target point, and β z=90°+θ-α′z.
10. The method of claim 1, wherein the method further comprises:
If the light source is a mobile light source, obtaining the mobile coordinates of the mobile light source each time;
According to the chassis coordinate information and the moving coordinates, recalculating a light source irradiation included angle of each first target point and a light source irradiation included angle of each second target point;
Obtaining a light source penetration distance corresponding to each second target point based on the light source irradiation included angle of each second target point;
and obtaining thickness compensation values of all the first target points of the mobile light source after each movement based on the light source irradiation included angle of each first target point, and obtaining thickness compensation values of all the second target points of the mobile light source after each movement based on the light source penetration distance corresponding to each second target point, so that after each movement of the mobile light source, the thickness compensation of the chassis is completed according to the thickness compensation values of all the first target points and the thickness compensation values of all the second target points.
CN202210332125.9A 2022-03-30 2022-03-30 Thickness compensation method for fruit tray Active CN114688982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210332125.9A CN114688982B (en) 2022-03-30 2022-03-30 Thickness compensation method for fruit tray

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210332125.9A CN114688982B (en) 2022-03-30 2022-03-30 Thickness compensation method for fruit tray

Publications (2)

Publication Number Publication Date
CN114688982A CN114688982A (en) 2022-07-01
CN114688982B true CN114688982B (en) 2024-06-21

Family

ID=82140819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210332125.9A Active CN114688982B (en) 2022-03-30 2022-03-30 Thickness compensation method for fruit tray

Country Status (1)

Country Link
CN (1) CN114688982B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107846583A (en) * 2017-10-27 2018-03-27 维沃移动通信有限公司 A kind of image shadow compensating method and mobile terminal
CN109341527A (en) * 2018-10-22 2019-02-15 广东工业大学 A structured light projection three-dimensional measurement system and method with automatic shadow compensation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1174681A3 (en) * 2000-06-23 2003-01-02 Ford Global Technologies, Inc. Method and apparatus for the determination of the contour of sheet metal blanks
KR102290750B1 (en) * 2019-08-13 2021-08-18 (주)디알젬 Table bucky tray and center line display method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107846583A (en) * 2017-10-27 2018-03-27 维沃移动通信有限公司 A kind of image shadow compensating method and mobile terminal
CN109341527A (en) * 2018-10-22 2019-02-15 广东工业大学 A structured light projection three-dimensional measurement system and method with automatic shadow compensation

Also Published As

Publication number Publication date
CN114688982A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US11393157B2 (en) Robust ray-triangle in intersection
US8570322B2 (en) Method, system, and computer program product for efficient ray tracing of micropolygon geometry
US7652677B2 (en) Graphics system employing pixel mask
EP3739549B1 (en) Shading cg representations of materials
US8803880B2 (en) Image-based lighting simulation for objects
US20160189387A1 (en) Methods and Apparatus for Depth Sensing
US9818383B2 (en) Methods and systems for non-destructive analysis of objects and production of replica objects
CN112999656B (en) Processing method and device of illumination probe, electronic equipment and storage medium
CN113591300A (en) 3D printing file generation method and device, computer equipment and storage medium
CN109949414A (en) The construction method and device of indoor map
CN108876704A (en) The method, apparatus and computer storage medium of facial image deformation
CN112308768B (en) Data processing method, device, electronic equipment and storage medium
CN114688982B (en) Thickness compensation method for fruit tray
CN112419460A (en) Method, apparatus, computer device and storage medium for baking model charting
Liu et al. Accurate volume calculation driven by Delaunay triangulation for coal measurement
CN109658494A (en) A kind of Shading Rendering method in three-dimensional visualization figure
Lastra et al. A particle-path based method for Monte-Carlo density estimation
CN116258969B (en) Structural member measuring method and device based on point cloud data
CN117582661A (en) Virtual model rendering method, device, medium and equipment
Koca et al. A hybrid representation for modeling, interactive editing, and real-time visualization of terrains with volumetric features
CN115294277B (en) Three-dimensional reconstruction method and device of object, electronic equipment and storage medium
US20220319097A1 (en) Ray-guided water caustics
EP4152261A1 (en) Target region positioning method and apparatus, device, medium, and program product
US20060133691A1 (en) Systems and methods for representing signed distance functions
CN116777731A (en) Method, apparatus, device, medium and program product for soft rasterization

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