CN109410213A - Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box - Google Patents

Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box Download PDF

Info

Publication number
CN109410213A
CN109410213A CN201811203558.4A CN201811203558A CN109410213A CN 109410213 A CN109410213 A CN 109410213A CN 201811203558 A CN201811203558 A CN 201811203558A CN 109410213 A CN109410213 A CN 109410213A
Authority
CN
China
Prior art keywords
bounding box
coordinate
pel
polygon
polygon pel
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.)
Pending
Application number
CN201811203558.4A
Other languages
Chinese (zh)
Inventor
常立博
王可
杜慧敏
曾泽沧
张丽果
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Posts and Telecommunications
Original Assignee
Xian University of Posts and Telecommunications
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 Xian University of Posts and Telecommunications filed Critical Xian University of Posts and Telecommunications
Priority to CN201811203558.4A priority Critical patent/CN109410213A/en
Publication of CN109410213A publication Critical patent/CN109410213A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The present invention relates to a kind of polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box, solves the problems, such as that existing trimming algorithm complexity is higher, hardware consumption is larger.Method includes the following steps: 1) obtain the minimum rectangular area comprising polygon pel in polygon pel coordinate system, which is bounding box;2) polygon pel coordinate system is converted into cutting coordinate system, in the case where cutting coordinate system, compares the coordinate of bounding box and the coordinate of crop window;3) clipping region is determined;4) polygon pel is cut;Retain the polygon pel in clipping region, the pel except clipping region is removed, polygon pel, which is cut, to be completed.

Description

Polygon pel method of cutting out, computer readable storage medium, electricity based on bounding box Sub- equipment
Technical field
The present invention relates to computer graphical processing fields, and in particular to a kind of polygon pel cutting side based on bounding box Method, computer readable storage medium, electronic equipment, for the cutting in geometric manipulations to polygon pel.
Background technique
With the development of computer graphics techniques, virtual reality (Virtual reality, VR) and augmented reality The extensive use of technologies such as (Augmented reality, AR), user require to get over to the speed and quality for generating photo realism graphic Come higher.Portable device especially smart phone and tablet computer etc. has become common electronic product, more high-qualities Shape rendered picture needs to be shown to portable equipment, and simple two-dimensional scene shows the demand for being no longer satisfied user.
In the geometric manipulations stage of traditional graph rendering pipeline, it is thus necessary to determine which part position of which pel or pel Inside the viewing volume that clipping volume inside or application program define.Traditional trimming algorithm turns the cutting of polygon pel Turn to the cutting of line segment, i.e., to polygon pel while intersect with clipping region while calculate intersection point, last intersection point connects in order It connects as the polygon pel to be cut.It can be seen that traditional method of cutting out is related to multiple intersection point calculation and a large amount of Operation, algorithm complexity is higher, and hardware consumption is larger.
Summary of the invention
It is related to multiple intersection point calculation and a large amount of operation, algorithm present invention aim to address existing method of cutting out The problem that complexity is higher, hardware consumption is larger, providing a kind of polygon pel method of cutting out, computer based on bounding box can Read storage medium, electronic equipment.
The technical scheme is that
A kind of polygon pel method of cutting out based on bounding box, comprising the following steps:
1) it in polygon pel coordinate system, obtains comprising by the minimum rectangular area of reduction polygon pel, the minimum Rectangular area is bounding box;
2) polygon pel coordinate system is converted into cutting coordinate system, in the case where cutting coordinate system, compares the coordinate of bounding box With the coordinate of crop window;
If bounding box is fully located at the outside of crop window, bounding box is abandoned, abandons polygon pel;
If bounding box is fully located inside crop window, retain bounding box, retains polygon pel, polygon pel is not It is cut;
If bounding box and crop window partially overlap, step 3) is executed;
3) clipping region is determined;
The size for comparing the coboundary Y-coordinate of crop window coboundary and bounding box takes biggish boundary in the two coordinate Coboundary as clipping region;
The size for comparing the lower boundary Y-coordinate of crop window lower boundary and bounding box takes lesser boundary in the two coordinate Lower boundary as clipping region;
The size for comparing the left margin X-coordinate of crop window left margin and bounding box takes biggish boundary in the two coordinate Left margin as clipping region;
The size for comparing the right margin X-coordinate of crop window right margin and bounding box takes lesser boundary in the two coordinate Right margin as clipping region;
Clipping region is determined using obtained four boundaries up and down;
4) polygon pel is cut;
Retain the polygon pel in clipping region, the pel except clipping region is removed, polygon pel has been cut At.
Further, step 1) is found out in each vertex respectively specifically, compare each apex coordinate of polygon pel X-coordinate and Y-coordinate maximum value and minimum value, determine a rectangular area according to four vertex, which is to surround The minimum rectangular area of this polygon pel.
Further, in step 2), the outside that bounding box is fully located at crop window includes following situations: bounding box is complete On the upside of crop window, bounding box is fully located on the downside of crop window, and bounding box is fully located on the left of crop window or surrounds Box is fully located on the right side of crop window.
It further, is to cut coordinate system by polygon pel coordinate system matrix conversion in step 2).
Under three-dimensional situation, the polygon pel method of cutting out provided by the invention based on bounding box, comprising the following steps:
1) cutting of Z-direction is carried out;
Polygon pel is judged whether in clipping volume, if polygon pel abandons polygon diagram not in clipping volume Member;If being thened follow the steps 2) in clipping volume in polygon pel;If will be cut in clipping volume in polygon pel part External pel removal, cuts intracorporal pel and executes step 2);
2) polygon pel is projected into XOY plane;
3) cutting of polygon pel is carried out;
3.1) it in polygon pel coordinate system, obtains comprising by the minimum rectangular area of reduction polygon pel, this is most Small rectangular area is bounding box;
3.2) polygon pel coordinate system is converted into cutting coordinate system, in the case where cutting coordinate system, compares the seat of bounding box The coordinate of mark and crop window;
If bounding box is fully located at the outside of crop window, bounding box is abandoned, abandons polygon pel;
If bounding box is fully located inside crop window, retain bounding box, retains polygon pel, polygon pel is not It is cut;
If bounding box and crop window partially overlap, step 3.3) is executed;
3.3) clipping region is determined;
The size for comparing the coboundary Y-coordinate of crop window coboundary and bounding box takes biggish boundary in the two coordinate Coboundary as clipping region;
The size for comparing the lower boundary Y-coordinate of crop window lower boundary and bounding box takes lesser boundary in the two coordinate Lower boundary as clipping region;
The size for comparing the left margin X-coordinate of crop window left margin and bounding box takes biggish boundary in the two coordinate Left margin as clipping region;
The size for comparing the right margin X-coordinate of crop window right margin and bounding box takes lesser boundary in the two coordinate Right margin as clipping region;
Clipping region is determined using obtained four boundaries up and down;
3.4) polygon pel is cut;
Retain the polygon pel in clipping region, the pel except clipping region is removed, polygon pel has been cut At.
Further, step 3.1) finds out each vertex specifically, compare each apex coordinate of polygon pel respectively In X-coordinate and Y-coordinate maximum value and minimum value, determine a rectangular area according to four vertex, which is packet Enclose the minimum rectangular area of this polygon pel.
Further, in step 3.2), the outside that bounding box is fully located at crop window includes following situations: bounding box is complete It is located on the upside of crop window entirely, bounding box is fully located on the downside of crop window, and bounding box is fully located on the left of crop window or packet Box is enclosed to be fully located on the right side of crop window.
It further, is to cut coordinate system by polygon pel coordinate system matrix conversion in step 3.2).
Meanwhile the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the calculating The step of machine program realizes any of the above-described the method when being executed by processor.
In addition, the present invention also provides a kind of electronic equipment, the electronic equipment includes:
Processor;
Computer readable storage medium, is stored thereon with computer program, and the computer program is transported by the processor The step of any of the above-described the method is executed when row.
Compared with prior art, the present invention having following technical effect that
1. the finally obtained clipping region of the present invention is effective region, retain the pel in clipping region, by Crop Area Pel except domain is rejected, and is not processed to the pel other than it, and the number for needing rasterization process processing pel is finally reduced Amount and region, reduce the workload of data processing, it is seen that this algorithm greatly reduces algorithm compared to other trimming algorithms and answers Miscellaneous degree and hardware consumption.
2. the method for the present invention can be compared accurate cutting to polygon pel, pass through the side up and down of bounding box Boundary's coordinate can determine the positional relationship of polygon pel and crop window, it is only necessary to carry out a small amount of calculating, hardware complexity It is low.
3. greatly reducing graphic plotting stream inventive process avoids cutting by sideline judge for complexity is carried out to polygon pel The load of waterline, this method only need to calculate the minimum rectangle for surrounding polygon pel, by this rectangle (surrounding frame) and cutting It surrounds frame to compare, obtains the relationship between them, it is only necessary to which being compared can complete to cut.
4. the method for the present invention is all suitable under two dimension or three-dimensional situation;Under two-dimensional case, compare triangle surround frame and Cut the X for surrounding frame, the size relation of Y-coordinate;Under three-dimensional situation, the cutting of Z-direction is first carried out, judges whether cutting In vivo, then reprojection is identical as two-dimensional case to XOY plane.
5. the method for the present invention is not necessarily to carry out the calculating of intersection point, multiplication and division resource is saved, complexity is low.
Detailed description of the invention
Fig. 1 is bounding box and crop window schematic diagram in the case where cutting coordinate system;
Fig. 2 is that bounding box is fully located at schematic diagram on the upside of crop window;
Fig. 3 is that bounding box is fully located at schematic diagram on the downside of crop window;
Fig. 4 is that bounding box is fully located at crop window leftschematic diagram;
Fig. 5 is that bounding box is fully located at crop window right side schematic view;
Fig. 6 is that bounding box is fully located at clipping region schematic internal view;
Fig. 7 is that bounding box and crop window partially overlap schematic diagram.
Appended drawing reference: 1- crop window, 2- polygon pel, 3- bounding box.
Specific embodiment
A kind of polygon pel method of cutting out based on bounding box, for the cutting in geometric manipulations to polygon pel, The following steps are included:
1) finding out a minimum rectangular area can include this polygon pel 2:
In polygon pel coordinate system, compare each apex coordinate of polygon pel 2, finds out X in each vertex and sit The maximin of mark and Y-coordinate, can determine a rectangular area according to this four vertex, it will thus be seen that the rectangular area It is the minimum rectangle that can surround this polygon pel 2, as bounding box 3 is later whole for the processing of the polygon pel 2 It is transferred to the processing to this bounding box 3;
It 2) is to cut coordinate system by polygon pel coordinate system matrix conversion, bounding box 3 is coordinately transformed in itself, is converted Into cutting coordinate system;In the case where cutting coordinate system, compares the coordinate of bounding box 3 and the coordinate of crop window 1, first judge bounding box Whether whether 3 be completely in inside crop window 1 in 1 outside of crop window or bounding box 3;
It can be there are four types of situation when bounding box 3 is fully located at outside crop window:
Bounding box 3 is fully located on the upside of crop window;
Bounding box 3 is fully located on the downside of crop window;
Bounding box 3 is fully located on the left of crop window;
Bounding box 3 is fully located on the right side of crop window;
When the establishment of above four kinds of situations, then the processing for carrying out step 3) is not needed, the bounding box 3 is directly abandoned, abandons more Side shape pel 2;
When bounding box 3 is fully located inside crop window, this bounding box 3 is fully retained, is sent to next stage processing, protects Polygon pel 2 is stayed, polygon pel 2 is not cut;
When all invalid above, step 3) is executed;
3) it when the object to be cut both had been not entirely in crop box, is also not entirely in outside crop box, then bounding box 3 There is part intersection with crop window 1, needs to cut cutting object in the case;
Compared with traditional algorithm, the method for the present invention can carry out cutting by sideline judge for complexity to avoid to polygon pel 2, specifically Method are as follows:
The size for comparing the coboundary Y-coordinate of crop window coboundary and bounding box 3 takes biggish boundary in the two coordinate Coboundary as clipping region;
The size for comparing the lower boundary Y-coordinate of crop window lower boundary and bounding box 3 takes lesser boundary in the two coordinate Lower boundary as clipping region;
The size for comparing the left margin X-coordinate of crop window left margin and bounding box 3 takes biggish boundary in the two coordinate Left margin as clipping region;
The size for comparing the right margin X-coordinate of crop window right margin and bounding box 3 takes lesser boundary in the two coordinate Right margin as clipping region;
A new clipping region can be determined using newest obtained four boundaries up and down, thus, it is possible to really It is partially to be cut which, which is determined, which is partially to retain;
4) the polygon pel 2 after the completion of bounding box 3 is cut is carried out still to be surrounded by an effective rectangle of minimum, it can also With the encirclement frame being referred to as after cutting.
Clipping region after step 4) is finally reduced is effective region, retains the pel in clipping region, will wrap Pel except peripheral frame is rejected, and is not processed to pel in addition, final to reduce quantity and the area for needing rasterization process pel Domain reduces the workload of data processing.It can be seen that this algorithm greatly reduces complexity compared to other clipping algorithms.
Under three-dimensional situation, the cutting of Z-direction is first carried out, is judged whether in clipping volume, then reprojection is flat to XOY Face, it is identical as two-dimensional case, that is, execute above method step.
When carrying out the cutting of Z-direction, it is only necessary to compare the Z coordinate of polygon pel and the minimax Z coordinate of clipping volume Relationship, be divided into following three kinds:
A. polygon pel is fully located at the top of clipping volume or is fully located at below clipping volume, illustrate and clipping volume without Intersection abandons polygon pel;
B. polygon pel and clipping volume have intersection in Z-direction, carry out Z-direction cutting;
Polygon pel is intersecting therewith above clipping volume, final new polygon pel ZMAXTake the Z of clipping volumeMAX,ZMIN Keep the Z of original polygon pelMINIt is constant;Polygon pel is intersecting therewith below clipping volume, final new polygon pel ZMINTake the Z of clipping volumeMIN,ZMAXKeep the Z of original polygon pelMAXIt is constant.
C. polygon pel is located inside clipping volume in Z-direction, i.e. the Z of polygon pelMAXLess than the Z of clipping volumeMAX, and The Z of polygon pelMINGreater than the Z of clipping volumeMIN, in this case, it is projected directly into XOY plane, carries out two-dimentional cutting.
The method of the present invention concrete application is as follows:
Assuming that there is the polygon pel 2 with n side, if cut by sideline judge to it, complexity is excessively high, hardware It consumes excessive, it can be cut using the method for bounding box 3.The present invention uses the minimum square being aligned anyhow with reference axis Shape region or 2 region of polygon pel cut the polygon pel 2.
The each apex coordinate for comparing polygon pel 2, finds out X thereinMAX,YMAX,XMIN,YMIN, pushed up according to this four Point can determine a rectangular area, it will thus be seen that the rectangular area is the minimum square that can surround this polygon pel 2 Shape, as bounding box 3.
It is respectively compared coboundary, the lower boundary, right margin, left margin of crop window and bounding box 3, determines bounding box 3 Which is partially to be cut, which is partially to retain.
For being located at the polygon pel 2 inside crop window, by comparing each side of bounding box 3 and crop window 1, When only bounding box 3 is across crop window 1, just needs cut the polygon pel 2, that is, to the bounding box 3 into Row is cut.Polygon pel after the completion of progress clipping region cutting is still surrounded by a minimum rectangle.
Bounding box coordinate representation:
X_BB_max, X_BB_min, Y_BB_max, Y_BB_min.
Crop window coordinate representation:
X_SC_max, X_SC_min, Y_SC_MAX, Y_SC_min.
The coordinate representation of shadow region: X_Smax, X_Smin, Y_Smax, Y_Smin
This algorithm is introduced by taking triangle as an example herein.
As shown in Figure 1, bounding box 3 and crop window in the case where cutting coordinate system, by comparing the X on each vertex of triangle And Y-coordinate, triangle can just be surrounded by finding one minimum rectangular area of maximum and minimum value formation.
When triangle bounding box 3 is fully located at 1 side of crop window, in these types of situation, whole bounding boxs 3 are abandoned, The polygon pel 2 is abandoned, that is, includes 4 kinds of situations, is i.e. legend 2 arrives these four situations of Fig. 5:
As shown in Fig. 2, bounding box 3 is fully located at 1 upside of crop window as Y_BB_max < Y_SC_min, the packet is abandoned Enclose box 3.
As shown in figure 3, bounding box 3 is fully located at 1 downside of crop window as Y_BB_min > Y_SC_max, the packet is abandoned Enclose box 3.
As shown in figure 4, bounding box 3 is fully located at 1 left side of crop window as X_BB_max < X_SC_min, the packet is abandoned Enclose box 3.
As shown in figure 5, bounding box 3 is fully located at 1 right side of crop window as X_BB_min > X_SC_max, the packet is abandoned Enclose box 3.
As shown in fig. 6, as Y_BB_max<Y_SC_max and Y_BB_min>Y_SC_max and X_BB_max<X_SC_max and X_BB_min > X_SC_min, bounding box 3 are fully located inside clipping region, i.e., polygon pel 2 is fully located at crop window 1 Inside retains the bounding box 3 in this case, that is, retains whole triangles.
As shown in fig. 7, the triangle (purple line segment) after cutting be still located in a small rectangle frame it is (negative in such as Fig. 7 Shown in shadow part).Therefore the cutting to the triangle can be completed in the rectangle frame for only needing to calculate the dash area.After cutting Region is still a rectangular area, although the region in shadow region other than the two lines section of triangle needs to carry out it Rendering, will cause additional Rendering operations.It is contemplated that traditional trimming algorithm calculate a large amount of multiplication and division operation of intersection point with And a large amount of bounding box is compromised, which can significantly reduce complexity really.
New bounding box coordinate is as follows:
This four coordinate vertices define a new rectangular area, thus form a new clipping region, only logical Comparator is crossed without arithmetical operation, completes the cutting of polygon pel, it is only necessary to the triangle in new clipping region The processing for carrying out next step, greatly reduces the application of hardware resource.
The embodiment of the present invention also provides a kind of computer readable storage medium, and for storing program, program is performed reality Now the step of polygon pel method of cutting out based on bounding box.In some possible embodiments, each side of the invention Face is also implemented as a kind of form of program product comprising program code, when described program product is transported on the terminal device When row, said program code is for executing the terminal device described in this specification above method part according to the present invention The step of various illustrative embodiments.
It, can be using portable compact disc read only memory (CD-ROM) simultaneously for realizing the program product of the above method Including program code, and can be run on terminal device, such as PC.However, program product of the invention is not limited to This, in this document, readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded Execution system, device or device use or in connection.
Program product can be using any combination of one or more readable mediums.Readable medium can be readable signal Jie Matter or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or partly lead System, device or the device of body, or any above combination.More specific example (the non exhaustive column of readable storage medium storing program for executing Table) it include: the electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only storage Device (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.

Claims (10)

1. a kind of polygon pel method of cutting out based on bounding box, which comprises the following steps:
1) it in polygon pel coordinate system, obtains comprising by the minimum rectangular area of reduction polygon pel, the minimum rectangle Region is bounding box;
2) polygon pel coordinate system is converted into cutting coordinate system, in the case where cutting coordinate system, compares the coordinate and sanction of bounding box Cut the coordinate of window;
If bounding box is fully located at the outside of crop window, bounding box is abandoned, abandons polygon pel;
If bounding box is fully located inside crop window, retain bounding box, retain polygon pel, polygon pel without It cuts;
If bounding box and crop window partially overlap, step 3) is executed;
3) clipping region is determined;
The size for comparing the coboundary Y-coordinate of crop window coboundary and bounding box takes biggish boundary conduct in the two coordinate The coboundary of clipping region;
The size for comparing the lower boundary Y-coordinate of crop window lower boundary and bounding box takes lesser boundary conduct in the two coordinate The lower boundary of clipping region;
The size for comparing the left margin X-coordinate of crop window left margin and bounding box takes biggish boundary conduct in the two coordinate The left margin of clipping region;
The size for comparing the right margin X-coordinate of crop window right margin and bounding box takes lesser boundary conduct in the two coordinate The right margin of clipping region;
Clipping region is determined using obtained four boundaries up and down;
4) polygon pel is cut;
Retain the polygon pel in clipping region, the pel except clipping region is removed, polygon pel, which is cut, to be completed.
2. the polygon pel method of cutting out according to claim 1 based on bounding box, it is characterised in that: step 1) is specific To compare each apex coordinate of polygon pel, finding out the maximum value and most of the X-coordinate and Y-coordinate in each vertex respectively Small value determines that a rectangular area, the rectangular area are the minimum rectangular areas for surrounding this polygon pel according to four vertex.
3. the polygon pel method of cutting out according to claim 1 based on bounding box, it is characterised in that: in step 2), The outside that bounding box is fully located at crop window refers to that bounding box is fully located on the upside of crop window, and bounding box is fully located at sanction It cuts on the downside of window, bounding box is fully located on the left of crop window or bounding box is fully located on the right side of crop window.
4. the polygon pel method of cutting out according to claim 1 or 2 or 3 based on bounding box, it is characterised in that: step It 2) is to cut coordinate system by polygon pel coordinate system matrix conversion in.
5. a kind of polygon pel method of cutting out based on bounding box, which comprises the following steps:
1) cutting of Z-direction is carried out;
Polygon pel is judged whether in clipping volume, if polygon pel not in clipping volume, abandons polygon pel;If In polygon pel in clipping volume, then follow the steps 2);If, will be outside clipping volume in polygon pel part in clipping volume Pel removal cuts intracorporal pel and executes step 2);
2) polygon pel is projected into XOY plane;
3) cutting of polygon pel is carried out;
3.1) it in polygon pel coordinate system, obtains comprising by the minimum rectangular area of reduction polygon pel, the minimum square Shape region is bounding box;
3.2) polygon pel coordinate system is converted into cutting coordinate system, in the case where cutting coordinate system, compare bounding box coordinate and The coordinate of crop window;
If bounding box is fully located at the outside of crop window, bounding box is abandoned, abandons polygon pel;
If bounding box is fully located inside crop window, retain bounding box, retain polygon pel, polygon pel without It cuts;
If bounding box and crop window partially overlap, step 3.3) is executed;
3.3) clipping region is determined;
The size for comparing the coboundary Y-coordinate of crop window coboundary and bounding box takes biggish boundary conduct in the two coordinate The coboundary of clipping region;
The size for comparing the lower boundary Y-coordinate of crop window lower boundary and bounding box takes lesser boundary conduct in the two coordinate The lower boundary of clipping region;
The size for comparing the left margin X-coordinate of crop window left margin and bounding box takes biggish boundary conduct in the two coordinate The left margin of clipping region;
The size for comparing the right margin X-coordinate of crop window right margin and bounding box takes lesser boundary conduct in the two coordinate The right margin of clipping region;
Clipping region is determined using obtained four boundaries up and down;
3.4) polygon pel is cut;
Retain the polygon pel in clipping region, the pel except clipping region is removed, polygon pel, which is cut, to be completed.
6. the polygon pel method of cutting out according to claim 5 based on bounding box, it is characterised in that: step 3.1) tool Body is each apex coordinate for comparing polygon pel, find out respectively the X-coordinate and Y-coordinate in each vertex maximum value and Minimum value determines that a rectangular area, the rectangular area are the smallest rectangular areas for surrounding this polygon pel according to four vertex Domain.
7. the polygon pel method of cutting out according to claim 5 based on bounding box, it is characterised in that: step 3.2) In, the outside that bounding box is fully located at crop window includes following situations: bounding box is fully located on the upside of crop window, bounding box It is fully located on the downside of crop window, bounding box is fully located on the left of crop window or bounding box is fully located on the right side of crop window.
8. the polygon pel method of cutting out according to claim 5 or 6 or 7 based on bounding box, it is characterised in that: step It 3.2) is to cut coordinate system by polygon pel coordinate system matrix conversion in.
9. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program quilt The step of claim 1-8 any the method is realized when processor executes.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processor;
Computer readable storage medium is stored thereon with computer program, when the computer program is run by the processor Perform claim requires the step of 1 to 8 any the method.
CN201811203558.4A 2018-10-16 2018-10-16 Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box Pending CN109410213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811203558.4A CN109410213A (en) 2018-10-16 2018-10-16 Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811203558.4A CN109410213A (en) 2018-10-16 2018-10-16 Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box

Publications (1)

Publication Number Publication Date
CN109410213A true CN109410213A (en) 2019-03-01

Family

ID=65468115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811203558.4A Pending CN109410213A (en) 2018-10-16 2018-10-16 Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box

Country Status (1)

Country Link
CN (1) CN109410213A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127299A (en) * 2020-03-26 2020-05-08 南京芯瞳半导体技术有限公司 Method and device for accelerating rasterization traversal and computer storage medium
CN112819223A (en) * 2021-01-29 2021-05-18 云南省测绘资料档案馆(云南省基础地理信息中心) High-performance intersection method for cutting polygon
CN112837328A (en) * 2021-02-23 2021-05-25 中国石油大学(华东) Rectangular window clipping and drawing method for two-dimensional polygonal graphic primitive
CN113034515A (en) * 2021-03-22 2021-06-25 易视腾科技股份有限公司 Bounding box tree-based polygon clipping method, electronic device and storage medium
CN113538460A (en) * 2021-07-12 2021-10-22 中国科学院地质与地球物理研究所 Shale CT image cutting method and system
CN115222806A (en) * 2022-09-20 2022-10-21 腾讯科技(深圳)有限公司 Polygon processing method, device, equipment and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127299A (en) * 2020-03-26 2020-05-08 南京芯瞳半导体技术有限公司 Method and device for accelerating rasterization traversal and computer storage medium
CN112819223A (en) * 2021-01-29 2021-05-18 云南省测绘资料档案馆(云南省基础地理信息中心) High-performance intersection method for cutting polygon
CN112837328A (en) * 2021-02-23 2021-05-25 中国石油大学(华东) Rectangular window clipping and drawing method for two-dimensional polygonal graphic primitive
US11798206B2 (en) 2021-02-23 2023-10-24 China University Of Petroleum (East China) Method for clipping two-dimensional (2D) polygon against rectangular view window
CN113034515A (en) * 2021-03-22 2021-06-25 易视腾科技股份有限公司 Bounding box tree-based polygon clipping method, electronic device and storage medium
CN113538460A (en) * 2021-07-12 2021-10-22 中国科学院地质与地球物理研究所 Shale CT image cutting method and system
CN113538460B (en) * 2021-07-12 2022-04-08 中国科学院地质与地球物理研究所 Shale CT image cutting method and system
CN115222806A (en) * 2022-09-20 2022-10-21 腾讯科技(深圳)有限公司 Polygon processing method, device, equipment and computer readable storage medium
CN115222806B (en) * 2022-09-20 2022-12-09 腾讯科技(深圳)有限公司 Polygon processing method, device, equipment and computer readable storage medium
WO2024060999A1 (en) * 2022-09-20 2024-03-28 腾讯科技(深圳)有限公司 Polygon processing method and apparatus, and device, computer-readable storage medium and computer program product

Similar Documents

Publication Publication Date Title
CN109410213A (en) Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box
CN108038897B (en) Shadow map generation method and device
CN110368694B (en) Game scene data processing method, device, equipment and readable storage medium
US9135750B2 (en) Technique for filling holes in a three-dimensional model
US20130328870A1 (en) System and Method for Generating 2D Texture Coordinates for 3D Meshed Surfaces
KR20160130433A (en) Method for efficient re-rendering objects to vary viewports and under varying rendering and rasterization parameters
CN105574931A (en) Electronic map road drawing method and device
CN113012269A (en) Three-dimensional image data rendering method and equipment based on GPU
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN104463942A (en) Three-dimensional image cropping method and device
CN113724401A (en) Three-dimensional model cutting method and device, computer equipment and storage medium
KR102477265B1 (en) Graphics processing apparatus and method for determining LOD (level of detail) for texturing of graphics pipeline thereof
US9858709B2 (en) Apparatus and method for processing primitive in three-dimensional (3D) graphics rendering system
EP3651122A1 (en) Computer graphics method for terrain rendering
CN106780693B (en) Method and system for selecting object in three-dimensional scene through drawing mode
CN112560126B (en) Data processing method, system and storage medium for 3D printing
CN114332203A (en) Method and device for determining light source information of virtual light source
CN112204624A (en) Method and device for automatically shearing model and storage medium
CN112837416A (en) Triangulation-based polygon rendering method and device and storage medium
CN112465692A (en) Image processing method, device, equipment and storage medium
KR20200058205A (en) Automated symbolization of 1:25,000 map based on domestic geometric characteristic
CN110335353B (en) Method, device, equipment and storage medium for automatically subdividing blocks
WO2024037116A9 (en) Three-dimensional model rendering method and apparatus, electronic device and storage medium
US11869123B2 (en) Anti-aliasing two-dimensional vector graphics using a compressed vertex buffer
CN111754381B (en) Graphics rendering method, apparatus, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190301

RJ01 Rejection of invention patent application after publication