Defect detection method for map of building block model, defect detection device and electronic equipment
Patent Information
- Application Number
- CN202611178255.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]有鉴于此,本申请实施例提供了一种积木模型的贴图缺陷检测方法、缺陷检测装置和电子设备,以解决现有的贴图缺陷检测方法存在的检测效率低下、缺陷检测不准确的问题
[0015]本申请实施例的第四方面提供了一种计算机可读存储介质,其上存储有计算机程序或指令,上述计算机程序或指令被处理器执行时实现上述方法的步骤。
Smart Images

Figure CN123015806A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of block design and image processing technology, and in particular relates to a method, device and electronic equipment for detecting texture defects in block models. Background Technology
[0002] Currently, personalized building block products include a large number of decalable building blocks, covering types such as photo printing, acrylic UV printing, and color stickers. Designers bind corresponding decal images to various building block parts in modeling software. Mass production factories then use hot stamping to print the decals onto the surface of the building blocks. Before mass production begins, all decals need to be reviewed for defects through cloud services to ensure the production quality of the building block products.
[0003] However, existing technologies suffer from low detection efficiency and inaccurate defect detection when inspecting textures, which leads to a decline in the production quality of building block products. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, device and electronic device for detecting texture defects in block models, in order to solve the problems of low detection efficiency and inaccurate defect detection in existing texture defect detection methods.
[0005] A first aspect of this application provides a method for detecting texture defects in a building block model, comprising: for a part texture of any building block part of the building block model, cropping the non-transparent pixels of the part texture based on a preset effective area of the part to obtain a part reference area, wherein the part reference area is determined based on the number of effective area pixels within the effective area of the part; performing a morphological smoothing operation on the part texture based on the transparency channel to obtain a smoothed effective area, wherein the smoothed effective area includes multiple smoothed area pixels; determining whether the multiple smoothed area pixels of the smoothed effective area satisfy texture defect conditions, and generating an area defect detection result, wherein the texture defect conditions are multiple judgment conditions determined based on the multiple smoothed area pixels, the part reference area, and the effective area of the part.
[0006] According to an embodiment of this application, before cropping, the method further includes: performing a pixel removal operation on the part texture based on the background color of the building block part to obtain a new part texture, wherein the new part texture represents the texture content.
[0007] According to an embodiment of this application, the texture defect detection method further includes: determining a region texture of a central region from the part texture; and performing the morphological smoothing operation on the region texture when the number of effective region pixels in the region texture meets the effective pixel threshold.
[0008] According to an embodiment of this application, the texture defect conditions include: the absolute number of pixels in multiple smooth regions is less than a first empirical lower limit; the ratio of the absolute number of pixels to the reference area of the part is less than a second empirical lower limit; the contact between the boundary of the smooth effective region and the effective region of the part constitutes a target relationship; and the smooth effective region has more than a target number of connected components. The determination of whether the multiple smooth region pixels in the smooth effective region satisfy the texture defect conditions and the generation of an area defect detection result includes: if the smooth effective region satisfies any of the determination conditions in the texture defect conditions, generating an area defect detection result characterizing the presence of a texture area defect.
[0009] According to an embodiment of this application, the texture defect detection method further includes: before cropping, extending the transparency channel of the part texture to obtain an anti-aliasing band, and deleting the anti-aliasing band; for the part texture after removing the anti-aliasing band, determining the number of pixels in the part texture whose transparency meets a preset transparency condition; and generating a semi-transparent defect detection result based on the number of pixels and a number threshold.
[0010] According to an embodiment of this application, the texture defect detection method further includes: determining the area ratio of the block part that is occluded by other block parts based on the part description information of each block part; and generating a texture occlusion detection result based on the area ratio and the occlusion threshold.
[0011] According to an embodiment of this application, the texture defect detection method further includes: for any of the building block parts, determining the part type of the building block part; generating a texture quantity detection result based on the part type and the texture list of the building block part, wherein the texture list represents the part textures corresponding to the building block part.
[0012] According to an embodiment of this application, the texture defect detection method further includes: generating a texture defect detection result based on at least one of the area defect detection result, the semi-transparent defect detection result, the texture occlusion detection result, and the texture quantity detection result.
[0013] A second aspect of this application provides a texture defect detection device for a building block model, comprising: a clipping module, configured to clip non-transparent pixels of a part texture for any building block part of the building block model based on a preset effective area of the part, to obtain a part reference area, wherein the part reference area is determined based on the number of effective area pixels within the effective area of the part; a smoothing module, configured to perform morphological smoothing operations on the part texture based on a transparency channel to obtain a smoothed effective area, wherein the smoothed effective area includes multiple smoothed area pixels; and a detection module, configured to determine whether the multiple smoothed area pixels of the smoothed effective area meet texture defect conditions, and generate an area defect detection result, wherein the texture defect conditions are multiple judgment conditions determined based on the multiple smoothed area pixels, the part reference area, and the effective area of the part.
[0014] A third aspect of this application provides an electronic device, including: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0015] A fourth aspect of this application provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0016] A fifth aspect of this application provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0017] The beneficial effects of this application's embodiments compared to existing technologies are as follows: By combining morphological smoothing and multiple fallback criteria, the problem of a single threshold failing on different block shapes is avoided, enabling the same set of detection rules to adaptively operate on all textureable block parts. By explicitly introducing the effective geometric area of the part into the reference area calculation process, the evaluation benchmark is decoupled from the specific shape of the block, overcoming the limitation of the one-size-fits-all criterion of the total number of non-transparent pixels in existing solutions. This not only identifies real defects where the total number of pixels meets the standard but is distributed as several small fragments, but also avoids misjudging legitimate small-area textures as defects due to differences in block size, significantly improving detection accuracy. Simultaneously, through the linkage judgment mechanism between the texture image and the part geometry, the evaluation benchmark for the effective area of hot stamping on blocks of different shapes is unified, overcoming the problem of inconsistent judgment standards caused by the different shapes of the effective areas of different parts. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This illustration shows an application scenario diagram of the texture defect detection method for block models according to an embodiment of this application; Figure 2 A flowchart of a texture defect detection method according to an embodiment of this application is shown; Figure 3 A flowchart illustrating the semi-transparent defect detection method according to an embodiment of this application is shown; Figure 4 This paper shows a structural block diagram of a texture defect detection device for a block model according to an embodiment of this application; Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing the above-described method according to an embodiment of this application. Detailed Implementation
[0020] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0025] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0026] In the current production process of personalized building block products, users bind texture images to corresponding building block parts in modeling software, and the mass production factory uses a matching process to heat-press the textures onto the corresponding surfaces of the building blocks. To avoid quality issues such as textures being obscured by parts, semi-transparent pixels causing white gaps during heat pressing, textures that are too small or fragmented, and textured building blocks without textures, the factory must conduct defect reviews of each texture through cloud services before officially scheduling production, thereby ensuring the quality of the finished building block products.
[0027] Currently, the mainstream solutions for texture defect detection are mainly divided into two categories. One relies on the operators to visually check all uploaded textures one by one, while the other uses simple fixed threshold rules to complete the detection. For example, small-area textures are judged by the threshold of the number of non-transparent pixels, semi-transparent defects are judged by the value of the transparency channel, and the background color is judged by the whole image traversal comparison method.
[0028] The existing detection solutions have several technical flaws: the workload of manual visual inspection increases proportionally with the size of the block model, with a single model typically containing dozens to hundreds of textures. This not only places a heavy burden on operations but also results in a high rate of missed detections, failing to meet the real-time detection requirements of mass production lines. The traditional one-size-fits-all pixel total threshold method cannot identify true defects where the total pixel count meets the standard but the pattern is fragmented. Furthermore, fixed thresholds are difficult to adapt to various block parts with vastly different sizes and shapes, easily leading to misjudgments of compliant small textures, resulting in low overall detection accuracy.
[0029] Meanwhile, the traditional logic for judging semi-transparent defects is simplistic and crude, judging semi-transparent pixels solely based on the value range of the transparency channel. This easily leads to misjudging normal anti-aliased transition pixels at the texture edge as defects, generating a large number of invalid false alarms. Existing detection mechanisms do not link and match texture images with the geometric information of the building block parts, making it impossible to specifically judge defects based on the effective area of the part's unique hot stamping. Furthermore, the texture detection and evaluation benchmarks for different shaped building blocks are inconsistent. In addition, texture occlusion detection requires linking the geometric relationship between the 2D texture and the 3D model; traditional image-by-image rasterization detection methods have extremely high computational overhead, making it difficult to achieve rapid online detection in mass production.
[0030] In view of this, embodiments of this application provide a method, device and electronic device for detecting texture defects in block models, in order to solve the problems of low detection efficiency and inaccurate defect detection in existing texture defect detection methods.
[0031] In this embodiment, a combined judgment mechanism of morphological smoothing and multiple fallback criteria avoids the problem of a single threshold failing on different block shapes, enabling the same set of detection rules to adaptively operate on all textureable block parts. By explicitly introducing the effective geometric area of the part into the reference area calculation process, the evaluation benchmark is decoupled from the specific shape of the block, solving the limitation of the one-size-fits-all criterion of the total number of non-transparent pixels in the existing scheme. This can identify real defects that meet the total pixel standard but are distributed as several small fragments, and will not misjudge legitimate small-area textures as defects due to differences in block size, significantly improving the detection accuracy. At the same time, through the linkage judgment mechanism between the texture image and the part geometry, the evaluation benchmark of the effective area of hot stamping on blocks of different shapes is unified, overcoming the problem of inconsistent judgment standards caused by the different shapes of the effective areas of different parts.
[0032] Figure 1 The diagram illustrates an application scenario of the texture defect detection method for block models according to an embodiment of this application. For example... Figure 1 As shown, application scenario 100 according to an embodiment of this application may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. For example, a user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send information, etc.
[0033] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be electronic devices such as smartphones, wearable devices, personal computers, and intelligent voice interaction devices. A client application for the target application can be installed and run on the terminal device. This target application can include, but is not limited to, applications such as block design applications, payment applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, and social media platform software (these are just examples). Furthermore, this application embodiment does not limit the form of the target application, and it can include, but is not limited to, applications installed on the terminal device, mini-programs, etc., and can also be in the form of a webpage.
[0034] Server 105 can be a server providing various services, such as a backend management server supporting websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and basic cloud computing services such as big data. The server can be the backend server of the aforementioned target application, used to provide backend services to the clients of the target application.
[0035] It should be noted that the texture defect detection method provided in this application embodiment can generally be executed by server 105 and / or terminal devices 101-103. Accordingly, the texture defect detection device provided in this application embodiment can generally be set in server 105 and / or terminal devices 101-103.
[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0037] Figure 2 A flowchart of a texture defect detection method according to an embodiment of this application is shown.
[0038] Please see Figure 2 An embodiment of a method for detecting texture defects in a block model, as described in this application, may include steps S201 to S203: In step S201, for any block part of the block model, the non-transparent pixels of the part texture are cropped based on the preset effective area of the part to obtain the part reference area, wherein the part reference area is determined based on the number of effective area pixels within the effective area of the part. In step S202, based on the transparency channel, a morphological smoothing operation is performed on the part texture to obtain a smoothed effective area, wherein the smoothed effective area includes multiple smoothed area pixels; In step S203, it is determined whether multiple smooth region pixels in the effective smooth area meet the mapping defect conditions, and an area defect detection result is generated. The mapping defect conditions are multiple judgment conditions determined based on multiple smooth region pixels, part reference area, and effective part area.
[0039] Block Model: A three-dimensional solid model composed of multiple building block parts, and custom texture patterns can be applied to the surface of each building block part.
[0040] Texture: Image data applied to the surface of building block parts, including color and transparency information, used to render printing, hot stamping, or sticker effects.
[0041] Part valid area: The range of geometric areas on the surface of a block part that allow textures to be rendered. This range can be found in a pre-configured library of valid geometric areas for parts, which is pre-configured by the designer based on the actual printable area of each part.
[0042] Non-transparent pixels: Pixels in the texture whose transparency channel value is higher than a preset threshold, representing the pixels of the actual content presented in the texture.
[0043] Part reference area: After the part texture is clipped with the part's effective area as the boundary, the number of effective area pixels within the effective area is used as a benchmark reference for defect judgment.
[0044] Transparency channel: also known as the alpha channel, is a separate data channel in the texture image used to record the transparency information of each pixel.
[0045] Morphological smoothing operation: A morphological closing operation performed based on the alpha channel, used to fill tiny holes inside the texture and bridge minor gaps to obtain a continuous and complete effective region outline.
[0046] Smoothed effective region: The continuous set of effective pixels obtained after morphological smoothing operation, which consists of multiple smoothed region pixels.
[0047] Texture defect conditions: A set of multiple judgment conditions constructed based on the smooth region pixels, the part reference area, and the effective area of the part.
[0048] Area Defect Detection Results: The detection conclusion output after performing defect judgment on a single part texture indicates whether the texture has area defects and the defect category.
[0049] For any block part in the building block model, the part texture is first cropped according to the preset effective area of the part. The system matches the effective area range corresponding to the current part from the effective area library of part geometry, removes non-transparent pixels outside the boundary of the effective area, and counts the total number of pixels in the effective area of the part. This value is used as the reference area of the part. The effective area library of part geometry is pre-configured by the designer and stores the printable geometric boundary data of various types of building block parts.
[0050] Subsequently, the alpha channel data of the part texture is extracted, and a morphological closing smoothing operation is performed on the alpha channel. This operation first dilates and then erodes to fill in tiny holes inside the texture and mend small gaps at the edges, connecting the originally discrete effective pixels into a whole, resulting in a smooth effective area composed of multiple smoothed pixels.
[0051] Finally, all smoothed region pixels within the effective smoothed area are included in the judgment process, and each pixel is checked to see if it meets the preset texture defect conditions. The texture defect conditions are constructed by combining the statistical values of smoothed region pixels, the reference area base value of the part, and the geometric constraints of the effective area of the part. They contain multiple sets of progressive judgment logic, and after all conditions are judged, the area defect detection result of the part texture is output.
[0052] According to embodiments of this application, a combined judgment mechanism of morphological smoothing and multiple fallback criteria avoids the problem of a single threshold failing on different block shapes, enabling the same set of detection rules to adaptively operate on all textureable block parts. By explicitly introducing the effective geometric area of the part into the reference area calculation process, the evaluation benchmark is decoupled from the specific shape of the block, solving the limitation of the one-size-fits-all criterion of the total number of non-transparent pixels in existing solutions. This not only identifies real defects where the total number of pixels meets the standard but is distributed as several small fragments, but also avoids misjudging legitimate small-area textures as defects due to differences in block size, significantly improving detection accuracy. At the same time, through the linkage judgment mechanism between the texture image and the part geometry, the evaluation benchmark of the effective area of hot stamping on blocks of different shapes is unified, overcoming the problem of inconsistent judgment standards caused by the different shapes of the effective areas of different parts.
[0053] According to an embodiment of this application, before cropping, the method further includes: performing pixel removal on the part texture based on the background color of the block part to obtain a new part texture, wherein the new part texture represents the texture content.
[0054] Part base color: The inherent base color of the building block part itself, which is the preset and fixed base color of the part when it leaves the factory, and is different from the color of the texture or hot stamping applied later.
[0055] Pixel removal operation: Based on the color similarity vectorization judgment rule, this is an image processing operation that filters out pixels in the part texture that have the same height as the background color of the part, in order to remove background color interference pixels.
[0056] Before performing the part texture clipping operation, the original part texture is pre-processed by background color purification to remove interference from the part's base color. The specific implementation process is as follows: The system first retrieves the inherent base color of the building block part to be tested. This base color is a fixed color for the building block part at the factory and is not part of the texture content for later printing or hot stamping. Then, a color similarity vectorization judgment method is used to compare the pixel vectors of each pixel of the original part texture with the part's base color, accurately quantifying the color difference between the two, and filtering out pixels that highly overlap with the part's base color.
[0057] Next, the percentage of overlapping background pixels within the preset valid area of the part is calculated. This percentage is compared with a system-preset threshold. When the percentage exceeds the threshold (e.g., 70%), these pixels are considered invalid background interference pixels and not valid texture content. At this point, a pixel culling operation is performed on the original part texture, deleting all background interference pixels that meet the criteria, completing the texture purification process. The result is a new part texture retaining only the actual hot stamping and pattern information. This purified new part texture will then be used for subsequent processing, including cropping, morphological smoothing, and texture defect detection.
[0058] According to the embodiments of this application, by using color similarity vectorization judgment and pixel removal operation based on the background color of the part, the hot stamping background color of the building block part and the actual texture content are accurately separated. This effectively avoids the problem of the background color pixels of the part body being misjudged as valid texture pixels, completely eliminates the interference of the background color on the statistics of the effective area of the texture and the judgment of defects, ensures the accuracy of subsequent reference area calculation, morphological smoothing processing and defect condition judgment, and further improves the universality and detection accuracy of texture defect detection of building block parts with different background colors.
[0059] According to an embodiment of this application, the texture defect detection method further includes: determining a region texture of the central region from the part texture; and performing a morphological smoothing operation on the region texture if the number of effective region pixels in the region texture meets the effective pixel threshold.
[0060] Central region: Based on the overall range of the block part texture map, the core center sub-region of the texture map is obtained by reserving fixed edge margins and then cutting it. It is the key area for determining the effective content of the texture core.
[0061] Region mapping: A sub-texture image corresponding to the central region extracted from the complete part texture, retaining only the core area of the texture.
[0062] Effective pixel threshold: A pixel count standard pre-set by the designer based on the specifications of the building block parts and experience in texture detection. It serves as the basis for determining the effectiveness of the texture in the central area. An example value is 100 pixels.
[0063] After completing the preprocessing steps of removing the background color and trimming the part texture, the center area of the part texture is further screened and determined.
[0064] First, according to preset fixed edge margin rules, the complete part texture is cropped to remove redundant areas at the edges, accurately extracting the central core area of the texture to obtain the corresponding region texture. Then, the total number of effective pixels within this region texture is counted, and the result is compared with a preset effective pixel threshold.
[0065] If the number of effective pixels in the central region exceeds the set effective pixel threshold, it indicates that the core area of the part texture has sufficient content, the texture is worth setting, and no further complex defect judgment process is needed; the texture can be directly judged as qualified. Only when the number of effective pixels in the central region does not reach the threshold standard will subsequent morphological smoothing operations and corresponding defect detection processes be performed on the region texture.
[0066] According to embodiments of this application, by cropping the central sub-region of the texture and matching it with an effective pixel threshold for pre-judgment, qualified textures with sufficient core content can be quickly screened out, enabling early identification of small-area meaningless textures. This effectively avoids performing redundant detection steps on extremely small-area textures with no setting value, greatly simplifying the detection process and improving detection efficiency. At the same time, it accurately filters defective textures with too few pixels in the core area, preventing invalid textures from participating in subsequent calculations, and further ensuring the efficiency and accuracy of overall texture defect detection.
[0067] According to embodiments of this application, the mapping defect conditions include: the absolute number of pixels in multiple smooth regions is less than a first empirical lower limit; the ratio of the absolute number of pixels to the part reference area is less than a second empirical lower limit; the contact between the boundaries of the smooth effective region and the part effective region constitutes a target relationship; and the smooth effective region has more than the target number of connected components.
[0068] According to an embodiment of this application, determining whether multiple smooth region pixels in the smooth effective region meet the texture defect conditions and generating an area defect detection result includes: generating an area defect detection result that characterizes the existence of a texture area defect when the smooth effective region meets any of the texture defect conditions.
[0069] First experience lower limit: The minimum absolute pixel count threshold of the smooth area is set in advance and serves as the benchmark for judging the total number of pixels. An example value of 20,000 pixels is used to check whether the overall pixel volume of the texture meets the standard.
[0070] Second empirical lower limit: The minimum threshold of pixel ratio set in advance, that is, the lower limit of the ratio of the total number of pixels in the smooth area to the reference area of the part. An example value is 25%, which is used to verify whether the effective coverage ratio of the texture meets the standard.
[0071] Target relationship: Specifically refers to the through-contact relationship formed by the boundary between the effective smoothing area and the effective part area. Specifically, the effective smoothing area has obvious contact on both sides of the effective part area, or there is a state of boundary contact and internal coverage at the same time.
[0072] Connected components: These refer to interconnected and independently formed effective pixel regions within the smoothed effective region. Each independently formed effective texture region is a connected component. In this application, the corresponding target number is one. When the number of effective connected components in the smoothed effective region exceeds one, it indicates that the texture has fragmented distribution defects.
[0073] After completing texture preprocessing, rapid center region determination, and morphological smoothing to obtain the smoothed effective area, a multi-dimensional catch-all defect determination is performed on the smoothed effective area. The system executes four judgment logics sequentially, and the four conditions are independent of each other; satisfying any one of them is sufficient to determine that the texture is qualified.
[0074] First, the total absolute number of pixels in the smoothed effective area is counted to determine if it reaches a preset first empirical lower limit. Second, the ratio of the absolute number of pixels to a predetermined part reference area is calculated, and this ratio is verified to reach a second empirical lower limit. Third, the adhesion between the smoothed effective area and the part's effective area is checked to determine if a through-target contact relationship has been formed. Finally, the number of effective connected components within the smoothed effective area is identified to determine if the number of independent connected areas exceeds the number of individual targets. If any one of the above four conditions is met, the current part texture is directly determined to have no area defects; if none of the four conditions are met, the texture is determined to have small area texture defects, and a corresponding area defect detection result is generated.
[0075] According to embodiments of this application, a progressive detection system is formed by constructing a four-fold fallback criterion, combined with pre-processing background removal, morphological smoothing, and a center fast-pass mechanism. This completely solves the problem of poor adaptability of a single threshold, allowing the same set of detection rules to adapt to all textureable blocks of different shapes and sizes. By using multi-dimensional linkage judgment based on absolute pixel count, area ratio, boundary contact state, and connected components, it can avoid the problems of false and missed judgments caused by a one-size-fits-all threshold, accurately identify hidden defects with sufficient pixels but fragmented distribution, and is compatible with various block geometries. This decouples the judgment criterion from the block shape, significantly improving the stability and accuracy of texture defect detection under different working conditions.
[0076] Figure 3 A flowchart illustrating the semi-transparent defect detection method according to an embodiment of this application is shown.
[0077] According to embodiments of this application, the texture defect detection method further includes operations S301 to S303: In operation S301, before clipping, the transparency channel of the part texture is expanded at the edges to obtain an anti-aliasing band, and then the anti-aliasing band is deleted.
[0078] In operation S302, for the part texture map after removing the anti-aliasing band, determine the number of pixels in the part texture map whose transparency meets the preset transparency conditions.
[0079] In operation S303, a semi-transparent defect detection result is generated based on the number of pixels and the number threshold.
[0080] Edge expansion: For the transparency channel of the part texture, a morphological dilation image processing method is used to expand the edge area of the texture to extract the transition area of the texture edge.
[0081] Anti-aliasing band: The semi-transparent transition pixel area formed by the anti-aliasing effect at the edge of the texture is a normal rendering transition area of the image and is not a texture defect. It needs to be removed in advance to avoid misjudgment.
[0082] Preset transparency conditions: Pre-defined semi-transparent pixel range conditions, specifically referring to the criteria for determining pixels whose transparency channel values are between fully transparent and fully opaque.
[0083] Quantity threshold: The empirical tolerance ratio of semi-transparent pixels pre-configured by the designer, which serves as a benchmark for determining whether a texture has semi-transparent defects. An example value is 1%.
[0084] Semi-transparent defect detection results: By statistically analyzing the number and proportion of semi-transparent pixels within the effective area, the final output conclusion on the semi-transparent defect of the texture is determined.
[0085] Before performing effective region clipping on the part texture, the texture's alpha channel is preprocessed to remove anti-aliased areas and detect semi-transparent defects. First, a binary edge detection operator (which can be replaced with other existing operators) is called to extract the image edge contours of the alpha channel. Then, morphological dilation is used to extend the extracted edges, generating a continuous anti-aliased band around the texture edge. This area consists of normal transition pixels generated by texture rendering and does not belong to abnormal defect pixels.
[0086] The generated anti-aliased bands are then completely removed from the part texture evaluation area, thoroughly stripping away edge transition interference areas and retaining only the effective detection area of the texture core. After removing the anti-aliased bands, all pixels within the remaining effective texture area are screened one by one, and the total number of semi-transparent pixels that meet the preset transparency conditions is counted. Based on the counted number of semi-transparent pixels, their pixel proportion within the effective area is calculated and compared with a preset quantity threshold, i.e., an empirical tolerance ratio. Finally, the corresponding semi-transparent defect detection result is generated based on the comparison result. If a semi-transparent defect is detected, the system can automatically generate a single-channel highlight image for all semi-transparent pixels and save it, facilitating accurate defect location and maintenance verification by staff.
[0087] According to embodiments of this application, a two-stage judgment logic—first removing anti-aliased transition areas and then calculating the proportion of internal semi-transparent pixels—is adopted. This eliminates the naive criterion of directly identifying semi-transparent pixels, effectively avoiding the problem of normal anti-aliased transition pixels at texture edges being misjudged as defects, and reducing the false alarm rate of semi-transparency detection to an extremely low level. It accurately distinguishes between normal rendering transition pixels and abnormal semi-transparent defect pixels, accurately identifies real semi-transparent flaws within part textures, overcomes the high false alarm rate of existing naive judgment rules, and significantly improves the accuracy and reliability of semi-transparent defect detection in block textures.
[0088] According to an embodiment of this application, the texture defect detection method further includes: determining the area ratio of a block part that is occluded by other block parts based on the part description information of each block part; and generating a texture occlusion detection result based on the area ratio and the occlusion threshold.
[0089] Part description information: Normalized geometric structure data generated by the 3D geometry verification pipeline preprocessing, which integrates geometric and assembly semantic information such as part shape and volume, assembly points, and assembly adaptation relationships, to provide a general read-only basic structure for multi-dimensional detection.
[0090] Occlusion area ratio: The ratio of the area of the texture patch of the current block part that is covered or occluded by other assembly parts to the total effective area of the texture. It is used to quantitatively determine the degree of texture occlusion.
[0091] Occlusion threshold: A threshold set by the designer based on experience, used as a criterion to distinguish between minor, negligible occlusion and severe, ineffective occlusion.
[0092] Main parts collection: A collection of core assembly parts for the model, used to filter out invalid occlusion interference from accessory parts and avoid false detection caused by slight occlusion of accessories.
[0093] Texture occlusion detection results: Based on the comparison between the occlusion area ratio of the part and the occlusion threshold, the output conclusion is the determination of whether the texture has effective occlusion defects.
[0094] This detection method supports the simultaneous parallel execution of multiple texture defect detection tasks. Area defect detection, semi-transparency defect detection, texture occlusion detection, and other detection processes have no sequential dependency, enabling comprehensive defect verification to be completed synchronously. In the texture occlusion detection stage, the normalized geometric structure pre-built in the 3D geometric verification sub-pipeline is reused, directly retrieving the part description information corresponding to each block part. This eliminates the need for separate rasterization calculations for each texture, effectively reusing existing data resources. Based on the surface assembly relationship in the normalized geometric structure, the occlusion status of each texture surface is calculated in batches using a surface overlap rate algorithm, accurately reading the proportion of occlusion area of the current block part texture covered by other assembled parts. During the detection process, the main part set is simultaneously matched and filtered to automatically eliminate minor occlusion interference caused by various optional accessory parts. The calculated occlusion area ratio is compared with a preset occlusion experience threshold. If the occlusion overlap rate of the texture surface belonging to the main part set exceeds the threshold, the texture is determined to have an occlusion defect, and a texture occlusion detection result representing the presence of texture occlusion defect is generated. If the occlusion overlap rate does not exceed the threshold, a texture occlusion detection result without occlusion defect is generated.
[0095] After determining that there is an occlusion defect or that the occlusion has been hit, the system automatically generates a visual geometric file, fills the occluded target parts with contrasting colors to highlight them, and accurately marks the position of the occluded triangular facets in the form of line segment overlay, so that designers can quickly locate the occlusion problem and complete the rectification and optimization in the original modeling software.
[0096] According to embodiments of this application, this solution supports simultaneous parallel detection of multiple types of texture defects, including occlusion, area, and semi-transparency, improving overall detection efficiency. By reusing a pre-built 3D geometric normalization structure, the occlusion ratio of textures is directly read based on the overlap rate of patches in the batch processing backend, eliminating the need for repeated rasterization of individual textures. This solves the problem of high computational overhead and inability to perform mass production online detection in traditional texture-geometric linkage judgment. The delay in occlusion judgment for dozens to hundreds of textures in a single model can be compressed to a mass production-ready range. Simultaneously, by filtering out minor occlusion interference from accessories through the main part set, false alarms are effectively avoided. Relying on a normalization structure that decouples geometry and assembly semantics to unify multi-dimensional verification benchmarks, coupled with visual annotation functions, occlusion defects can be accurately located, balancing detection speed and accuracy.
[0097] According to an embodiment of this application, the texture defect detection method further includes: for any building block part, determining the part type of the building block part; and generating a texture quantity detection result based on the part type and the texture list of the building block part, wherein the texture list represents the part texture corresponding to the building block part.
[0098] Part Type: Parts are categorized based on the attributes of the block part template. They are mainly divided into categories of blocks that can be textured and blocks that cannot be textured, which serve as the basic classification basis for texture compliance verification.
[0099] Texture list: A collection of all textures configured for a single block part, which fully records all texture resource information associated with the part.
[0100] Texture quantity detection results: After verifying the part type, business grouping rules and texture list quantity, the output part texture configuration compliance judgment results include judgment conclusions such as no texture defects and non-compliant texture quantity.
[0101] This step can be executed in parallel with area defect detection, semi-transparency defect detection, and texture occlusion detection to achieve full-dimensional compliance verification of textures. During detection, all building block parts in the model are traversed one by one. First, the part type corresponding to the current building block part is identified and determined, the part template attributes are retrieved, and it is determined whether the part belongs to the preset type of textureable building block.
[0102] Then, the texture list corresponding to the building block part is retrieved to obtain the actual number of textures configured for the part and the group matching information. For building blocks determined to be of the textureable category, it is checked whether their texture list is empty. If the texture list has no texture resources, it is determined that the part has a missing texture defect. At the same time, according to preset business rules, it is checked whether the number of textures corresponding to the group to which the textureable building block belongs meets the configuration agreement. Finally, combining the part type determination result, the completeness of the texture list, and the quantity matching, the corresponding texture quantity detection result is generated.
[0103] According to embodiments of this application, texture configuration is verified by classifying it according to part type, specifically screening for compliance issues such as empty textures and incorrect texture quantities in textureable blocks, thereby achieving standardized and automated verification of block texture configuration. Relying on dual verification logic of part category and business grouping rules, configuration defects such as missing textures and incorrect texture quantities are accurately identified, filling the gap in traditional defect detection which only focuses on texture image quality and lacks configuration compliance verification, thus comprehensively improving the standardization and yield rate of block model texture assembly.
[0104] According to an embodiment of this application, the texture defect detection method further includes: generating a texture defect detection result based on at least one of an area defect detection result, a semi-transparent defect detection result, a texture occlusion detection result, and a texture quantity detection result.
[0105] All sub-detection modules, including area defect detection, semi-transparency defect detection, texture occlusion detection, and texture quantity detection, are uniformly registered in a preset verification item function table according to the configuration rules of skippable switch sets and check-only switch sets. This allows callers to flexibly start and stop each detection sub-module according to detection requirements. The various defect sub-detection processes execute independently and synchronously in parallel, outputting corresponding area defect detection results, semi-transparency defect detection results, texture occlusion detection results, and texture quantity detection results, respectively.
[0106] The system aggregates all sub-item detection results for comprehensive judgment. When any sub-item detection result indicates the presence of a corresponding defect, all defect information is integrated to generate a texture defect detection result indicating a defect in the texture of the building block part. When all sub-item detection results are determined to be defect-free, a texture defect detection result indicating that the texture of the building block part is qualified is generated. The entire detection process is executed on a cloud service node, running serially with the geometry verification sub-pipeline and sharing a unified normalized geometric structure, effectively controlling the overall detection latency. After a defect is detected, the system packages the corresponding intermediate visualization images and geometry files for various defects into a unified compressed package. Finally, in accordance with the unified external contract with the geometry verification sub-pipeline, the detection results are output in a standardized format as a triplet of error message, hit dictionary, and compressed package path.
[0107] According to embodiments of this application, a unified final detection conclusion is generated by aggregating multi-dimensional sub-detection results, achieving integrated judgment of various texture quality defects and configuration defects, avoiding the problem of missed detections in single-dimensional detection. Relying on a unified verification item function table and switch configuration mechanism, it supports flexible start and stop of detection items to adapt to different detection scenarios, improving the versatility of the solution. Simultaneously, the normalized geometric structure is executed and reused in the cloud, and a unified triplet result format is output externally, standardizing the detection output standard, effectively controlling overall pipeline delays, and fully adapting to mass production batch detection requirements.
[0108] Figure 4A structural block diagram of a texture defect detection device for a block model according to an embodiment of this application is shown.
[0109] like Figure 4 As shown, the texture defect detection device 400 for the block model includes a trimming module 410, a smoothing module 420, and a detection module 430.
[0110] The trimming module 410 is used to trim the non-transparent pixels of the part texture for any block part of the block model based on a preset effective area of the part, so as to obtain the part reference area. The part reference area is determined based on the number of effective area pixels within the effective area of the part.
[0111] The smoothing module 420 is used to perform morphological smoothing operations on the part texture based on the transparency channel to obtain a smooth effective area, wherein the smooth effective area includes multiple smooth area pixels.
[0112] The detection module 430 is used to determine whether multiple smooth region pixels in the effective smooth area meet the texture defect conditions and generate area defect detection results. The texture defect conditions are multiple judgment conditions determined based on multiple smooth region pixels, part reference area, and effective part area.
[0113] According to embodiments of this application, a combined judgment mechanism of morphological smoothing and multiple fallback criteria avoids the problem of a single threshold failing on different block shapes, enabling the same set of detection rules to adaptively operate on all textureable block parts. By explicitly introducing the effective geometric area of the part into the reference area calculation process, the evaluation benchmark is decoupled from the specific shape of the block, solving the limitation of the one-size-fits-all criterion of the total number of non-transparent pixels in existing solutions. This not only identifies real defects where the total number of pixels meets the standard but is distributed as several small fragments, but also avoids misjudging legitimate small-area textures as defects due to differences in block size, significantly improving detection accuracy. At the same time, through the linkage judgment mechanism between the texture image and the part geometry, the evaluation benchmark of the effective area of hot stamping on blocks of different shapes is unified, overcoming the problem of inconsistent judgment standards caused by the different shapes of the effective areas of different parts.
[0114] According to embodiments of this application, the texture defect detection device further includes a rejection module.
[0115] The culling module is used to perform pixel culling operations on the part texture map based on the background color of the block part to obtain a new part texture map, where the new part texture map represents the texture content.
[0116] According to an embodiment of this application, the texture defect detection device further includes a first determining module.
[0117] The first determining module is used to determine the region map of the central region from the part map; and to perform morphological smoothing operation on the region map if the number of effective region pixels in the region map meets the effective pixel threshold.
[0118] According to embodiments of this application, the mapping defect conditions include: the absolute number of pixels in multiple smooth regions is less than a first empirical lower limit; the ratio of the absolute number of pixels to the part reference area is less than a second empirical lower limit; the contact between the boundaries of the smooth effective region and the part effective region constitutes a target relationship; and the smooth effective region has more than the target number of connected components.
[0119] According to an embodiment of this application, the detection module includes a generation unit.
[0120] The generation unit is used to generate area defect detection results that represent the presence of texture area defects, provided that any judgment condition in the texture defect conditions is met in the smooth effective region.
[0121] According to embodiments of this application, the texture defect detection device further includes an expansion module, a second determination module, and a semi-transparent defect detection module.
[0122] An extension module is used to extend the edge of the transparency channel of the part map before clipping, to obtain an anti-aliasing band, and then remove the anti-aliasing band.
[0123] The second determining module is used to determine the number of pixels in the part texture whose transparency meets the preset transparency conditions after removing the anti-aliasing band.
[0124] The semi-transparent defect detection module is used to generate semi-transparent defect detection results based on the number of pixels and a number threshold.
[0125] According to an embodiment of this application, the texture defect detection device further includes a third determination module and a texture occlusion detection module.
[0126] The third determining module is used to determine the proportion of the area of a building block that is obscured by other building blocks based on the part description information of each building block.
[0127] The texture occlusion detection module is used to generate texture occlusion detection results based on the area ratio and occlusion threshold.
[0128] According to an embodiment of this application, the texture defect detection device further includes a fourth determination module and a texture quantity detection module.
[0129] The fourth determination module is used to determine the part type of any given block part.
[0130] The texture quantity detection module is used to generate texture quantity detection results based on the part type and the texture list of the building block parts. The texture list represents the part textures corresponding to the building block parts.
[0131] According to an embodiment of this application, the texture defect detection device further includes a texture defect detection module.
[0132] The texture defect detection module is used to generate texture defect detection results based on at least one of the following: area defect detection results, semi-transparency defect detection results, texture occlusion detection results, and texture quantity detection results.
[0133] According to embodiments of this application, any plurality of modules among the trimming module 410, smoothing module 420, and detection module 430 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the trimming module 410, smoothing module 420, and detection module 430 can be at least partially implemented as a hardware circuit, such as a field-programmable gate array, a programmable logic array, a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit, or any other reasonable means of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the trimming module 410, smoothing module 420, and detection module 430 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0134] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing the above-described method according to an embodiment of this application.
[0135] like Figure 5 As shown, an electronic device 500 according to an embodiment of this application includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory 502 or a program loaded from a storage portion 508 into a random access memory 503. The processor 501 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a dedicated microprocessor. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application.
[0136] Random access memory 503 stores various programs and data required for the operation of electronic device 500. Processor 501, read-only memory 502, and random access memory 503 are interconnected via bus 504. Processor 501 executes various steps of the method flow according to embodiments of this application by executing programs in read-only memory 502 and / or random access memory 503. It should be noted that the programs may also be stored in one or more memories other than read-only memory 502 and random access memory 503. Processor 501 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0137] According to embodiments of this application, the electronic device 500 may further include an input / output interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card, such as a local area network card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0138] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0139] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 502, and / or random access memory 503, and / or one or more memories other than read-only memory 502 and random access memory 503 described above.
[0140] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0141] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0142] In embodiments of this application, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0143] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0145] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for detecting texture defects in a block model, characterized in that, include: For any block part of the building block model, the non-transparent pixels of the part texture are cropped based on a preset effective area of the part to obtain a reference area of the part. The reference area of the part is determined based on the number of effective area pixels within the effective area of the part. Based on the transparency channel, a morphological smoothing operation is performed on the part texture to obtain a smoothed effective area, wherein the smoothed effective area includes multiple smoothed area pixels; Determine whether multiple smooth region pixels of the effective smooth region meet the mapping defect conditions, and generate an area defect detection result. The mapping defect conditions are multiple judgment conditions determined based on the multiple smooth region pixels, the reference area of the part, and the effective region of the part.
2. The texture defect detection method according to claim 1, characterized in that, Before cutting, the following is also included: Based on the base color of the building block part, a pixel culling operation is performed on the part texture to obtain a new part texture, wherein the new part texture represents the texture content.
3. The texture defect detection method according to claim 1, characterized in that, Also includes: Determine the region map of the central area from the part texture map; If the number of effective region pixels in the region map meets the effective pixel threshold, the morphological smoothing operation is performed on the region map.
4. The texture defect detection method according to any one of claims 1 to 3, characterized in that, The texture defect conditions include: the absolute number of pixels in multiple smooth regions is less than a first empirical lower limit; the ratio of the absolute number of pixels to the reference area of the part is less than a second empirical lower limit; the contact between the effective smooth region and the effective region of the part constitutes a target relationship; and the effective smooth region has more connected components than the target. The process of determining whether multiple smoothed region pixels in the effective smoothed region meet the mapping defect conditions and generating area defect detection results includes: If any of the judgment conditions in the texture defect conditions are met in the smooth effective area, an area defect detection result representing the presence of texture area defects is generated.
5. The texture defect detection method according to claim 1, characterized in that, Also includes: Before trimming, the transparency channel of the part texture is expanded at the edges to obtain an anti-aliasing band, and then the anti-aliasing band is deleted. For the part texture map after removing the anti-aliasing band, determine the number of pixels in the part texture map whose transparency meets the preset transparency condition; Based on the number of pixels and the number threshold, a semi-transparent defect detection result is generated.
6. The texture defect detection method according to claim 5, characterized in that, Also includes: Based on the part description information of each building block, determine the proportion of the area of the building block that is obscured by other building blocks; Based on the area ratio and occlusion threshold, the texture occlusion detection result is generated.
7. The texture defect detection method according to claim 6, characterized in that, Also includes: For any of the building block parts, determine the part type of the building block part; Based on the part type and the texture list of the building block parts, a texture quantity detection result is generated, wherein the texture list represents the part textures corresponding to the building block parts.
8. The texture defect detection method according to claim 7, characterized in that, Also includes: A texture defect detection result is generated based on at least one of the area defect detection result, the semi-transparency defect detection result, the texture occlusion detection result, and the texture quantity detection result.
9. A device for detecting texture defects in a building block model, characterized in that, include: The trimming module is used to trim the non-transparent pixels of the part texture of any block part of the block model based on a preset effective area of the part, so as to obtain a part reference area, wherein the part reference area is determined based on the number of effective area pixels within the effective area of the part. A smoothing module is used to perform morphological smoothing operations on the part texture based on the transparency channel to obtain a smoothed effective area, wherein the smoothed effective area includes multiple smoothed area pixels; The detection module is used to determine whether multiple smooth region pixels of the effective smooth area meet the mapping defect conditions and generate area defect detection results. The mapping defect conditions are multiple judgment conditions determined based on the multiple smooth region pixels, the reference area of the part, and the effective area of the part.
10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
