EPG page focus identification method, system and device and medium

Through the method of color space conversion, morphological processing and outline selection of EPG pages, the accurate and automatic recognition and labeling of focus is achieved, solving the problems of difficulty and low efficiency in traditional methods, and improving the efficiency and accuracy of content crawling and analysis.

CN119693611AInactive Publication Date: 2025-03-25GOLDEN TIMES CULTURE COMM

Patent Information

Application Number
CN202411685649.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-23
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

EPG page focus recognition is difficult to achieve accuracy and efficiency. Traditional methods rely on manual annotation and cannot cope with the need for massive content crawling, and the existing technology is difficult to identify in complex contexts.

Method used

By receiving the image files of the EPG page, color space conversion, morphological processing, edge detection and contour screening are performed, and the focus area is automatically identified and marked with preset color features and morphological features.

Benefits of technology

It realizes accurate and automatic identification and labeling of EPG page focus, improves the accuracy and efficiency of identification, reduces labor costs, and makes content crawling and analysis more efficient and accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693611A_ABST
    Figure CN119693611A_ABST
Patent Text Reader

Abstract

The invention relates to an EPG page focus identification method, system and device and a medium, and belongs to the technical field of image processing and computer vision, the identification method comprises the following steps: receiving an image file of an EPG page, and obtaining original image data; performing color space conversion on the original image data to obtain converted HSV color space image data; filtering the HSV color space image data according to a preset color feature interval, and performing morphological processing to generate a mask image containing a focus area; performing edge detection on the mask image to obtain an edge image of the focus area; performing contour detection on the edge image to obtain a detected contour set; based on a preset focus morphological feature, screening the contour set to obtain a screened focus contour; and marking a focus area in the original image data according to the screened focus contour to obtain a focus marking image. The accuracy and efficiency of focus position recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing and computer vision technology, and in particular to an EPG page focus recognition method, system, device and medium. Background Art

[0002] With the widespread popularity of digital TV and IPTV, the electronic program guide (EPG) has become an important entry point for user interaction. Its content display and operation experience directly affect the user's efficiency and satisfaction. The EPG page presents program navigation information in the form of images or video streams, including program classification, content introduction and operation focus. However, the focus identification and content acquisition of EPG pages have always been technical difficulties in the industry. Traditional methods usually rely on manual annotation or simple sampling points to complete. This method is not only inefficient, but also unable to cope with the content capture needs of massive EPG pages, which seriously restricts the ability of IPTV operators in content management and user behavior analysis.

[0003] At present, since EPG pages are mostly presented in the form of images and video streams, their data transmission relies on IPTV private networks or cable networks, and structured data cannot be directly accessed, which makes it difficult to apply traditional page crawling technologies based on HTML or JSON parsing. At the same time, most existing technologies use manual sampling points to transmit them back to the background for recognition. This method is not only complicated to operate, but also prone to insufficient coverage, resulting in the inability to fully obtain the page content. In addition, the layout style of EPG pages is diverse and the background is complex. The difference between the focus area and the surrounding content may not be obvious, which further increases the difficulty of focus recognition. Therefore, in the face of the diverse layout and complex background of EPG pages, how to improve the accuracy and efficiency of focus position recognition is a problem that needs to be solved urgently. Summary of the invention

[0004] In order to improve the accuracy and efficiency of focus position recognition, the present application provides an EPG page focus recognition method, system, device and medium.

[0005] In a first aspect, the present application provides an EPG page focus recognition method, which adopts the following technical solution: A method for identifying an EPG page focus, the method comprising: Receive the image file of the EPG page and obtain the original image data; Performing color space conversion on the original image data to obtain converted HSV color space image data; Filtering the HSV color space image data according to a preset color feature interval, and performing morphological processing to generate a mask image containing a focus area; Performing edge detection on the mask image to obtain an edge image of the focus area; Performing contour detection on the edge image to obtain a detected contour set; Based on the preset focus morphological features, the contour set is screened to obtain a screened focus contour; The focus area in the original image data is annotated according to the filtered focus contour to obtain a focus-annotated image.

[0006] By adopting the above technical solution, accurate automatic recognition and marking of EPG page focus is achieved, overcoming the inefficiency and error problems of traditional manual processing methods. This technical solution not only improves the automation and accuracy of focus recognition, but also significantly reduces labor costs, making the content capture and analysis of EPG pages more efficient and accurate. This application provides an efficient and flexible technical solution for the automated processing of large-scale EPG page content, and provides solid technical support for content analysis, data collection and intelligent operations in the fields of IPTV, smart TVs, etc.

[0007] Optionally, the step of filtering the HSV color space image data according to a preset color feature interval and performing morphological processing to generate a mask image containing a focus area includes: Get the historical sample image data of the EPG page; Performing statistics on the focus area in the historical sample data to extract the HSV color feature range; Determine a preset color feature interval according to the HSV color feature range; Performing pixel filtering on the HSV color space image data based on the preset color feature interval to generate a filtered mask image; Performing an integrity check on the filtered mask image to obtain an integrity check result; The mask image is morphologically processed based on the integrity check result to obtain a mask image containing a focus area.

[0008] By adopting the above technical solution, the HSV color features of the focus area are extracted from the historical samples, and the focus area is accurately filtered and optimized by combining integrity inspection and morphological processing. The mask image finally generated has high integrity and accuracy, significantly reduces noise interference, and provides reliable input data for subsequent image processing steps (such as edge detection and contour extraction). The overall solution effectively improves the efficiency and quality of focus recognition, and is particularly suitable for EPG page processing tasks with complex backgrounds and diverse scenes.

[0009] Optionally, the step of performing contour detection on the edge image to obtain a detected contour set includes: Optimizing the edge image based on a region filtering algorithm; Based on the contour detection algorithm, the closed area in the optimized edge image is identified, the edge information is extracted and the contour set is preliminarily determined; Preliminarily screening the preliminarily determined contour set based on the preset contour features to obtain a preliminarily screened contour set; The shape feature of each contour in the contour set is analyzed to obtain a contour set containing geometric feature descriptors.

[0010] By adopting the above technical solution, the edge image is processed in multiple steps, from optimizing edge data to identifying and screening contours, gradually improving the accuracy and reliability of contour detection. Noise edges are removed through regional filtering, closed areas are extracted using contour detection algorithms, and contours are screened and quantified in combination with preset contour features and geometric descriptors, ultimately generating a high-quality contour set. This technical solution effectively reduces the impact of interference factors on the identification of focal areas, ensures the accuracy and consistency of the results, and provides a solid technical foundation for subsequent analysis, annotation, and application.

[0011] Optionally, the preset focal morphological features include preset contour area features, preset aspect ratio features, preset contour convex hull features and preset contour edge number features.

[0012] Optionally, based on the preset focus morphological features, the step of filtering the contour set to obtain the filtered focus contour includes: Extracting a geometric feature descriptor of each contour according to the contour set; The preset focus morphological features are matched with the geometric feature descriptors of each contour respectively, and the contours that meet the preset focus morphological features are screened and determined as the focus contours.

[0013] By adopting the above technical solutions, the contour collection is screened in a multi-dimensional and precise manner. In the extraction stage, contour information is quantified through multiple features such as area, perimeter, aspect ratio, convex hull characteristics, etc.; in the matching stage, contours that meet the focus characteristics are screened using preset standards to ensure the accuracy and applicability of the recognition results. The entire process is well-structured and logically clear, which is suitable for both focus recognition in simple backgrounds and target contour screening tasks in complex scenes. The final focus contour collection provides a high-quality foundation for subsequent annotation, analysis, and data storage.

[0014] Optionally, after the step of obtaining the detected contour set, the method further includes: Annotating the original image data according to the detected contour set to obtain a contour-annotated image; The contour-annotated image is sent to a debugging terminal for display.

[0015] By adopting the above technical solution, the contour annotation image is sent to the debugging terminal in real time for developers to analyze, providing developers with a convenient visual debugging tool, significantly improving the development efficiency and verification quality of the detection algorithm. The advantages of this technical solution in accuracy and real-time performance make it of great practical significance in the field of EPG content analysis.

[0016] Optionally, after the step of marking the focus area in the original image data according to the filtered focus contour to obtain the focus marked image, the method further includes: Obtaining a bounding rectangle of the focus area, and adding text annotation information to the bounding rectangle; the text annotation information includes a unique identifier, a focus number or a content category; Performing a highlighting process on the focus area to obtain a focus highlighted annotated image; Performing statistical analysis on the text annotation information, and extracting geometric feature descriptors of the focus area for structured processing to obtain structured statistical data; The focus-highlighted annotated image and the structured statistical data are sent to a debugging terminal for display.

[0017] By adopting the above technical solution, the selected focus contours are annotated, described and highlighted, generating intuitive and informative annotated images, extracting and storing statistical information, and then transmitting the results to the debugging terminal through the upload function for real-time viewing and analysis. This technical solution enhances the interpretability and verifiability of focus recognition, providing efficient support for subsequent algorithm optimization and user operations, and is particularly suitable for target annotation tasks in complex backgrounds.

[0018] In a second aspect, the present application provides an EPG page focus recognition system, which adopts the following technical solution: An EPG page focus recognition system, the recognition system comprising: A data acquisition module is used to receive the image file of the EPG page and obtain the original image data; A color space conversion module, used for performing color space conversion on the original image data to obtain converted HSV color space image data; A color feature filtering module, used to filter the HSV color space image data according to a preset color feature interval; A morphological processing module, used for performing morphological processing on the filtered HSV color space image data to generate a mask image containing a focus area; An edge detection module, used to perform edge detection on the mask image to obtain an edge image of a focus area; A contour detection module, used to perform contour detection on the edge image to obtain a detected contour set; A contour screening module, used for screening the contour set based on preset focus morphological features to obtain a screened focus contour; A focus-annotated image is used to annotate the focus area in the original image data according to the filtered focus contour to obtain a focus-annotated image.

[0019] In a third aspect, the present application provides a computer device, which adopts the following technical solution: A computer device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the methods in the first aspect.

[0021] In summary, the present application includes at least one of the following beneficial technical effects: the present application realizes the automatic recognition of EPG page focus, effectively replaces the traditional manual operation method, and greatly improves the recognition efficiency; combined with Canny edge detection and contour screening technology, through optimization means such as filling holes and polygon approximation, the accuracy of focus recognition is significantly improved; at the same time, the technical solution can accurately locate the page content, realize automatic capture and efficient analysis of the content, overcome the problem of insufficient data sampling in traditional solutions, and provide reliable technical support for batch capture and analysis of EPG content. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a first flow chart of an EPG page focus identification method according to one of the embodiments of the present application.

[0023] Figure 2 This is a mask image after HSV filtering in one of the embodiments of the present application.

[0024] Figure 3 It is a mask image processed by morphological closing operation in one of the embodiments of the present application.

[0025] Figure 4 This is an edge image after edge detection in one of the embodiments of the present application.

[0026] Figure 5 This is a second flow chart of an EPG page focus identification method according to one of the embodiments of the present application.

[0027] Figure 6 This is a third flow chart of an EPG page focus identification method according to one of the embodiments of the present application.

[0028] Figure 7 This is a fourth flow chart of an EPG page focus identification method according to one of the embodiments of the present application.

[0029] Figure 8 This is a fifth flow chart of an EPG page focus identification method according to one of the embodiments of the present application.

[0030] Fig. 9 This is a sixth flow chart of an EPG page focus identification method according to one of the embodiments of the present application. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-9 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] The embodiment of the present application discloses a method for identifying an EPG page focus.

[0033] Reference Figure 1 , a method for identifying EPG page focus, the identification method comprising: Step S101, receiving an image file of an EPG page and acquiring original image data; Specifically, by reading the EPG page image file, it is loaded into an image data format that can be processed by the system to ensure the normal operation of subsequent steps. Exemplarily, cv2.imdecode or similar methods can be used to convert the stored EPG page image file into image matrix data in memory for subsequent processing.

[0034] Step S102, performing color space conversion on the original image data to obtain converted HSV color space image data; Among them, the original image data is converted from the BGR color model to the HSV model to facilitate a more accurate description of color features, thereby achieving efficient color feature screening.

[0035] It is understandable that the BGR model is a basic format based on pixel color, but it cannot effectively distinguish brightness changes. The HSV model represents color through hue, saturation, and value, which can better separate hue and brightness information.

[0036] Step S103, filtering the HSV color space image data according to a preset color feature interval, and performing morphological processing to generate a mask image containing the focus area; Specifically, by setting a specific HSV value range (color feature interval), pixels that meet the color features of the focus area are screened out. The HSV value range is pre-set according to the color features of the focus area.

[0037] For example, some focus areas may be bright green, so lower_bright=[35,100,100] and upper_bright=[85,255,255] can be defined to generate a mask image and retain only pixels that meet the conditions, providing a basis for subsequent morphological processing and contour detection.

[0038] Among them, the holes are filled by morphological closing operation, small noise points are removed, and the focus area is made more complete. For example, an elliptical or rectangular structure element can be used for morphological closing operation to fill the broken parts of the focus area and improve the accuracy of subsequent recognition.

[0039] Reference Figure 2 , Figure 3 , Figure 2 The image shown is an HSV filtered image of one embodiment of the present application, where only pixels meeting the conditions are retained; Figure 3 The figure shows a mask image after morphological closing operation processing according to one embodiment of the present application, in which the focus area is displayed complete by filling the broken parts of the focus area.

[0040] Step S104, performing edge detection on the mask image to obtain an edge image of the focus area; In some embodiments, the Canny edge detection algorithm can be used to extract edges in an image. The Canny algorithm finds edges in an image by calculating the gradient values ​​of pixels and can suppress the influence of noise, thereby extracting clear boundaries of the focus area and obtaining a binary image containing the edges of the focus area.

[0041] The performance of the Canny algorithm depends on the selection of high and low thresholds. Reasonable threshold settings can balance the sensitivity and accuracy of edge detection and avoid too many or too few edges being detected. In addition, the results of edge detection may have isolated noise points or incomplete edge connections. Post-processing operations can further optimize edge quality and ensure edge continuity and integrity.

[0042] Reference Figure 4 The figure shows an edge image after edge detection according to one embodiment of the present application. The edge in the image is found by calculating the gradient value of the pixel to extract the clear boundary of the focus area.

[0043] Step S105, performing contour detection on the edge image to obtain a detected contour set; Among them, the closed area formed by the edge can be located by a contour detection algorithm, for example, using the cv2.findContours method to obtain all possible closed contours, and the results are stored as a contour set.

[0044] Step S106, based on the preset focus morphological features, the contour set is screened to obtain a screened focus contour; Among them, the contours are filtered according to the preset focal morphological features (such as area, shape, etc.). For example, the most likely focal area is screened out by calculating the contour area, aspect ratio, number of edges, convex hull characteristics, etc., and contours that are too small, too large, or abnormal in shape are excluded.

[0045] Step S107 , annotating the focus area in the original image data according to the filtered focus contour to obtain a focus-annotated image.

[0046] Among them, the identified focus area is visually annotated on the original image, and an annotated image that intuitively displays the focus position is generated to facilitate user confirmation; in some embodiments, cv2.drawContours can be used to draw the filtered focus contour on the original image and save the result.

[0047] In the above implementation, accurate automatic recognition and marking of EPG page focus is achieved, overcoming the inefficiency and error problems of traditional manual processing methods. This technical solution not only improves the automation and accuracy of focus recognition, but also significantly reduces labor costs, making the content capture and analysis of EPG pages more efficient and accurate. This application provides an efficient and flexible technical solution for the automated processing of large-scale EPG page content, and provides solid technical support for content analysis, data collection and intelligent operation in the fields of IPTV, smart TV, etc.

[0048] Reference Figure 5 As an implementation of step S103, the steps of filtering the HSV color space image data according to the preset color feature interval and performing morphological processing to generate a mask image containing the focus area include: Step S201, obtaining historical sample image data of an EPG page; Among them, historical sample data is the basis for constructing color feature intervals. By performing statistical analysis on the color distribution of the focus area in a large number of samples, the characteristic range of the target color can be extracted.

[0049] In some embodiments, by collecting EPG page sample data covering different scenes and interfaces, it can be ensured that the sample data covers a variety of color changes in the focus area, thereby ensuring the adaptability and accuracy of the interval.

[0050] Step S202, performing statistics on the focus area in the historical sample data to extract the HSV color feature range; Among them, by analyzing the color characteristics of the focus area in the sample, extracting its HSV distribution range, and forming a scientific feature interval. Specifically, by manually or automatically marking the focus area in the sample, using the color analysis tool to extract the HSV value distribution of the focus area, counting the minimum, maximum and median of the HSV value, excluding abnormal values, and obtaining the HSV color feature range.

[0051] Step S203, determining a preset color feature interval according to the HSV color feature range; Among them, combined with the statistical analysis results, specific HSV upper and lower limit values ​​are generated as conditions for subsequent image filtering; for example, the HSV range obtained by statistics can be used to set interval values, such as [lower_h, lower_s, lower_v] and [upper_h, upper_s, upper_v], to ensure that the interval values ​​cover all possible focus area color features.

[0052] Step S204, performing pixel filtering on the HSV color space image data based on a preset color feature interval to generate a filtered mask image; The set HSV range is used to filter out pixels that meet the characteristics, and a binary mask image that only retains the focus area is generated; for example, each pixel in the HSV image can be compared with a preset interval, and the pixels that meet the interval conditions are set to white (255), and the other pixels are set to black (0).

[0053] Step S205, performing integrity check on the filtered mask image to obtain an integrity check result; Among them, by analyzing the distribution of white pixels in the mask image, the integrity of the focus area is evaluated to determine whether further optimization is needed. For example, the number of white pixels can be counted, the coherence and area of ​​the white pixels can be detected to see if they meet expectations, and whether further optimization is needed can be marked.

[0054] Step S206: Perform morphological processing on the mask image based on the integrity check result to obtain a mask image including the focus area.

[0055] Specifically, if the integrity of the mask image does not meet the requirements, morphological operations can be used to repair the breaks or small holes in the focus area; for example, structural elements can be used to fill the broken parts of the focus area and remove isolated noise points to obtain a mask image containing the complete focus area, providing high-quality data for subsequent edge detection and contour recognition.

[0056] In the above implementation, the HSV color features of the focus area are extracted from the historical samples, and the integrity check and morphological processing are combined to achieve accurate filtering and optimization of the focus area. The mask image finally generated has high integrity and accuracy, significantly reduces noise interference, and provides reliable input data for subsequent image processing steps (such as edge detection and contour extraction). The overall solution effectively improves the efficiency and quality of focus recognition, and is particularly suitable for EPG page processing tasks with complex backgrounds and diverse scenes.

[0057] Reference Figure 6 As an implementation of step S105, the step of performing contour detection on the edge image to obtain a detected contour set includes: Step S301, optimizing the edge image based on a regional filtering algorithm; Among them, edge detection may produce isolated noise edges or small pseudo edges, which are usually not valid contours of the focus area. Removing meaningless edge areas through regional filtering algorithms can significantly improve the efficiency and accuracy of subsequent contour detection.

[0058] In some embodiments, connected component analysis can be used to mark all connected areas in the edge image, calculate the pixel area of ​​each connected area, and eliminate areas with an area smaller than a threshold (such as noise points), so that areas that meet the area requirements are retained as the optimized edge image.

[0059] Step S302, identifying the closed area in the optimized edge image based on the contour detection algorithm, extracting edge information and preliminarily determining a contour set; Among them, the possible closed areas in the edge image can be identified through the contour detection algorithm, and the contour information of each area can be extracted to form a preliminary contour set.

[0060] In some embodiments, the cv2.findContours method can be used to perform contour detection on the optimized edge image; the contour retrieval mode is specified to be cv2.RETR_EXTERNAL to extract only the outermost contour to avoid interference from nested contours; in addition, the contour approximation method is set to cv2.CHAIN_APPROX_SIMPLE to reduce redundant contour points and optimize storage efficiency.

[0061] Step S303, preliminarily screening the preliminarily determined contour set based on the preset contour features to obtain a preliminarily screened contour set; Among them, some detected contours may come from non-target areas or false edges. Through preliminary screening based on preset features such as area and aspect ratio, contours that do not meet the requirements can be effectively eliminated.

[0062] Specifically, by calculating the area of ​​each contour, contours with an area smaller than min_area_threshold or larger than max_area_threshold can be eliminated; by calculating the aspect ratio of the minimum circumscribed rectangle of the contour, contours with an aspect ratio not in a preset range can be filtered out, and then the contours that meet the conditions can be stored in the contour set after preliminary screening.

[0063] Step S304: analyzing the shape features of each contour in the contour set to obtain a contour set containing geometric feature descriptors.

[0064] Among them, by conducting in-depth analysis of the geometric features of each contour, such as contour area, convex hull features, aspect ratio features, number of edges, etc., the shape characteristics of the contour are further quantified to provide a basis for subsequent fine screening.

[0065] In some embodiments, convex hull calculation is to use cv2.convexHull method to calculate the convex hull characteristics of each contour and analyze its matching degree with the actual contour; perimeter calculation is to calculate the perimeter of the contour to measure the complexity of the shape; polygon approximation is to use cv2.approxPolyDP method to approximate the contour into a polygon and record its vertex number and angle distribution.

[0066] In the above implementation, the edge image is processed in multiple steps, from optimizing edge data to identifying and screening contours, gradually improving the accuracy and reliability of contour detection. Noise edges are removed by regional filtering, closed areas are extracted using contour detection algorithms, and contours are screened and quantified in combination with preset contour features and geometric descriptors, ultimately generating a high-quality contour set. This technical solution effectively reduces the impact of interference factors on the identification of focal areas, ensures the accuracy and consistency of the results, and provides a solid technical foundation for subsequent analysis, annotation, and application.

[0067] As an implementation of the preset focus morphological features, the preset focus morphological features include preset contour area features, preset aspect ratio features, preset contour convex hull features and preset contour edge number features.

[0068] For the preset contour area feature, the focus area usually has a specific area range. A contour that is too small may be noise, while a contour that is too large may cover the background area. Contours that obviously do not meet the requirements can be removed through area filtering. Specifically, the cv2.contourArea method can be used to calculate the area of ​​each contour, that is, contours with an area less than min_area_threshold or greater than max_area_threshold in the contour set can be removed.

[0069] For the preset aspect ratio feature, the shape of the focus area usually has a certain aspect ratio. By calculating the aspect ratio of the bounding rectangle of the contour, the contours that do not meet the geometric features can be further filtered out. Specifically, the cv2.boundingRect method can be used to calculate the minimum bounding rectangle of the contour, calculate the aspect ratio of the bounding rectangle, and filter out contours whose aspect ratio is not within a reasonable range.

[0070] For the preset contour convex hull feature, the contour of the focus area is usually more regular, and the convex hull can be used to describe the overall morphological characteristics of the contour. By calculating the ratio of the convex hull area of ​​the contour to the actual contour area, overly complex or abnormal contours can be eliminated. Specifically, the cv2.convexHull method can be used to calculate the convex hull of each contour, and by calculating the ratio of the convex hull area to the actual contour area, contours whose ratios are not within a reasonable range can be eliminated.

[0071] For the preset contour edge count feature, the contour of the focus area can usually be approximated as a regular polygon (such as a rectangle). By calculating the number of vertices of the contour through polygon approximation, the contours that do not conform to the target shape can be further filtered. Specifically, the cv2.approxPolyDP method can be used to approximate the contour to a polygon, count the number of vertices of the polygon, and eliminate contours whose vertex numbers do not meet the preset range.

[0072] Reference Figure 7 As an implementation method of step S106, based on the preset focus morphological features, the contour set is screened to obtain the screened focus contour, which includes: Step S401, extracting a geometric feature descriptor of each contour according to the contour set; Among them, each contour has specific geometric features, such as area, perimeter, aspect ratio, convex hull characteristics, etc. These features can quantitatively describe the shape and structure of the contour. By calculating these feature descriptors, data support is provided for subsequent morphological feature matching.

[0073] Exemplarily, the contour collection is traversed, and the geometric features of each contour are calculated. For example, cv2.contourArea can be used to calculate the contour area to reflect the size of the contour; cv2.arcLength can be used to calculate the contour perimeter; cv2.boundingRect can be used to obtain the width and height of the circumscribed rectangle to calculate the aspect ratio; cv2.convexHull can be used to calculate the convex hull area of ​​the contour and compare the ratio of the convex hull area to the actual area of ​​the contour; cv2.approxPolyDP can be used to approximate the contour to a polygon and obtain the number of vertices of the polygon.

[0074] Step S402, matching the preset focus morphological features with the geometric feature descriptors of each contour respectively, screening the contours that meet the preset focus morphological features and determining them as focus contours.

[0075] Among them, the morphological features of the focus area (such as area range, aspect ratio range, vertex number range, etc.) can be pre-defined as screening criteria. By matching these preset features with the geometric features of the contour one by one, the contours that meet the conditions are screened out.

[0076] For example, the range of preset focal morphological features can be predefined, such as area range, aspect ratio range, vertex number range, convex hull feature range, etc. By traversing the geometric feature descriptors of the contour, each feature value is matched with the corresponding preset range, and the contour that meets all conditions is retained as the focal contour.

[0077] It should be noted that the preset focal morphological features can be pre-set according to actual conditions, and the screening criteria can be screened according to multiple feature ranges at the same time, such as screening according to the area range and the aspect ratio range at the same time, or according to a single feature range, such as screening only according to the convex hull characteristic range. This application does not limit this.

[0078] In the above implementation, the contour set is screened in a multi-dimensional and precise manner. The extraction stage quantifies the contour information through multiple features such as area, perimeter, aspect ratio, convex hull characteristics, etc.; the matching stage uses preset standards to screen out contours that meet the focus characteristics, ensuring the accuracy and applicability of the recognition results. The entire process is well-structured and logically clear, which is suitable for both focus recognition in simple backgrounds and target contour screening tasks in complex scenes. The final focus contour set provides a high-quality foundation for subsequent annotation, analysis, and data storage.

[0079] Reference Figure 8 As a further implementation of the EPG page focus recognition method, after obtaining the detected contour set in step S105, it also includes: Step S501, annotating the original image data according to the detected contour set to obtain a contour annotated image; After all possible closed contours are detected in the edge image, the detected contours are drawn onto the original image to generate a contour annotation image. In some embodiments, the cv2.drawContours method can be used to visually annotate each contour in the original image so that developers can observe the detection effect.

[0080] Step S502: Send the contour-annotated image to a debugging terminal for display.

[0081] Specifically, the generated annotated image is transmitted to the development and debugging terminal through a network or a local interface, and the image is sent to a debugging display device using an appropriate transmission protocol (such as HTTP or Socket) for real-time debugging and verification by developers.

[0082] In the above implementation, the contour-annotated image is sent to the debugging terminal in real time for the developer to analyze, providing the developer with a convenient visual debugging tool, which significantly improves the development efficiency and verification quality of the detection algorithm. The advantages of this technical solution in accuracy and real-time performance make it of great practical significance in the field of EPG content analysis.

[0083] Reference Fig. 9 As a further implementation of the EPG page focus recognition method, after the step of annotating the focus area in the original image data according to the filtered focus contour to obtain the focus annotated image in step S107, the method further includes: Step S601, obtaining a bounding rectangle of a focus area, and adding text annotation information to the bounding rectangle; wherein the text annotation information includes a unique identifier, a focus number or a content category; Specifically, the bounding rectangle of the focus area can intuitively represent its boundary range, and adding text annotation information (such as a unique identifier, number or content category) in the bounding rectangle helps to improve the readability and information carrying capacity of the annotated image.

[0084] In some embodiments, cv2.boundingRect may be used to calculate the minimum bounding rectangle of each focus outline, and text information (such as "Focus 1") may be drawn on top of or inside the bounding rectangle to distinguish each focus area.

[0085] Step S602, highlighting the focus area to obtain a focus highlighted annotated image; Among them, the highlight display processing can enhance the visual appeal of the focus area, form a strong contrast with the background, and make it easier for users to notice the marked area.

[0086] Specifically, a mask image of the same size as the original image can be created, and the cv2.drawContours method can be used to draw the focus outline on the mask image and fill it with a specific color (such as translucent green). By superimposing the mask image on the original image, a highlight effect can be formed.

[0087] Step S603, statistically analyzing the text annotation information, and extracting the geometric feature descriptors of the focus area for structural processing to obtain structured statistical data; Among them, by counting the annotation information of the focus area (such as number, category) and extracting its geometric feature descriptors (such as area, perimeter, aspect ratio, center point position, etc.), the focus information can be structured to provide data support for subsequent analysis and operations.

[0088] Specifically, by traversing the focus contour set, its geometric features such as area, perimeter, and aspect ratio of the circumscribed rectangle are extracted, and then the text annotation information is associated with the geometric features and stored as structured data in JSON or CSV format.

[0089] Step S604: sending the highlighted annotated image and structured statistical data to the debugging terminal for display.

[0090] The generated annotated image and structured statistical data are sent to the debugging terminal through a network or a local interface to support real-time viewing and analysis by the user. In some embodiments, the annotated image and statistical data files can be uploaded to the debugging terminal using the HTTP protocol, and the debugging terminal displays the annotated image in real time and generates visual analysis results based on the statistical data.

[0091] In the above implementation, the selected focus contours are labeled, described and highlighted to generate an intuitive and informative labeled image. At the same time, statistical information is extracted and stored, and the results are then transmitted to the debugging terminal through the upload function for real-time viewing and analysis. This technical solution enhances the interpretability and verifiability of focus recognition, provides efficient support for subsequent algorithm optimization and user operations, and is particularly suitable for target labeling tasks in complex backgrounds.

[0092] In actual application, this application, as a forward technology for EPG page content capture and identification solutions, provides a remote control command strategy path through accurate identification and classification of focus, thereby realizing the traversal and collection of EPG content for IPTV locations. By identifying the focus of the navigation bar, content classification information is obtained, and further identifying the focus of the classified content, sub-content or playback pages can be deeply obtained, and the playback content can be analyzed. In addition, as a front-end technology for automatic content crawling and analysis, this application also solves the problems of high labor costs and low efficiency, and can be combined with OCR or AI analysis tools to realize content classification, organization and basic analysis, significantly improving the intelligence level and efficiency of data processing.

[0093] The embodiment of the present application also discloses an EPG page focus recognition system.

[0094] An EPG page focus recognition system, the recognition system comprising: A data acquisition module is used to receive the image file of the EPG page and obtain the original image data; A color space conversion module is used to perform color space conversion on the original image data to obtain converted HSV color space image data; A color feature filtering module, used to filter HSV color space image data according to a preset color feature interval; A morphological processing module is used to perform morphological processing on the filtered HSV color space image data to generate a mask image containing the focus area; An edge detection module is used to perform edge detection on the mask image to obtain an edge image of the focus area; A contour detection module is used to perform contour detection on edge images to obtain a detected contour set; A contour screening module is used to screen the contour set based on the preset focus morphological features to obtain the screened focus contour; The focus-annotated image is used to annotate the focus area in the original image data according to the filtered focus contour to obtain the focus-annotated image.

[0095] In the above implementation, through modular design, the acquisition, processing and analysis of EPG page image data are decomposed into multiple orderly and independent steps, from color space conversion to morphological processing, and then to edge detection, contour screening and annotation, and the focus area is gradually extracted and marked, thereby realizing automatic and efficient focus recognition, significantly improving recognition accuracy and processing efficiency, and reducing the cost and error of traditional manual intervention.

[0096] In practical applications, this application provides a reliable technical foundation for fields such as IPTV and smart TV, supports automatic capture, classification and analysis of content, and provides key support for subsequent program recommendations, user interaction optimization and intelligent content management.

[0097] An EPG page focus recognition system according to an embodiment of the present application can implement any of the above-mentioned EPG page focus recognition methods, and the specific working process of each module in the EPG page focus recognition system can refer to the corresponding process in the above-mentioned method embodiment.

[0098] In the several embodiments provided in this application, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are only illustrative; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0099] The embodiment of the present application also discloses a computer device.

[0100] The computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned EPG page focus identification method is implemented.

[0101] The embodiment of the present application also discloses a computer-readable storage medium.

[0102] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the above-mentioned EPG page focus identification methods.

[0103] Among them, computer-readable storage media can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus or device; the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0104] It should be noted that in the above embodiments, the description of each embodiment has different emphases, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0105] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

Claims

1. A method for identifying EPG page focus, characterized in that: The identification method comprises: Receive the image file of the EPG page and obtain the original image data; Performing color space conversion on the original image data to obtain converted HSV color space image data; Filtering the HSV color space image data according to a preset color feature interval, and performing morphological processing to generate a mask image containing a focus area; Performing edge detection on the mask image to obtain an edge image of the focus area; Performing contour detection on the edge image to obtain a detected contour set; Based on the preset focus morphological features, the contour set is screened to obtain a screened focus contour; The focus area in the original image data is annotated according to the filtered focus contour to obtain a focus-annotated image.

2. The EPG page focus recognition method according to claim 1, characterized in that: The steps of filtering the HSV color space image data according to a preset color feature interval and performing morphological processing to generate a mask image containing a focus area include: Get the historical sample image data of the EPG page; Performing statistics on the focus area in the historical sample data to extract the HSV color feature range; Determine a preset color feature interval according to the HSV color feature range; Performing pixel filtering on the HSV color space image data based on the preset color feature interval to generate a filtered mask image; Performing an integrity check on the filtered mask image to obtain an integrity check result; The mask image is morphologically processed based on the integrity check result to obtain a mask image containing a focus area.

3. The EPG page focus recognition method according to claim 1, characterized in that: The step of performing contour detection on the edge image to obtain a detected contour set includes: Optimizing the edge image based on a region filtering algorithm; Based on the contour detection algorithm, the closed area in the optimized edge image is identified, the edge information is extracted and the contour set is preliminarily determined; Preliminarily screening the preliminarily determined contour set based on the preset contour features to obtain a preliminarily screened contour set; The shape feature of each contour in the contour set is analyzed to obtain a contour set containing geometric feature descriptors.

4. The EPG page focus recognition method according to claim 1, characterized in that: The preset focus morphological features include preset contour area features, preset aspect ratio features, preset contour convex hull features and preset contour edge number features.

5. The EPG page focus recognition method according to claim 4, characterized in that: The step of screening the contour set based on the preset focus morphological features to obtain the screened focus contour comprises: Extracting a geometric feature descriptor of each contour according to the contour set; The preset focus morphological features are matched with the geometric feature descriptors of each contour respectively, and the contours that meet the preset focus morphological features are screened and determined as the focus contours.

6. A method for identifying EPG page focus according to any one of claims 1 to 5, characterized in that: After the step of obtaining the detected contour set, the following steps are further included: Annotating the original image data according to the detected contour set to obtain a contour-annotated image; The contour-annotated image is sent to a debugging terminal for display.

7. The EPG page focus recognition method according to claim 3, characterized in that: After the step of marking the focus area in the original image data according to the filtered focus contour to obtain a focus-marked image, the method further includes: Obtaining a bounding rectangle of the focus area, and adding text annotation information to the bounding rectangle; the text annotation information includes a unique identifier, a focus number or a content category; Performing a highlighting process on the focus area to obtain a focus highlighted annotated image; Performing statistical analysis on the text annotation information, and extracting geometric feature descriptors of the focus area for structured processing to obtain structured statistical data; The focus-highlighted annotated image and the structured statistical data are sent to a debugging terminal for display.

8. An EPG page focus recognition system, characterized in that: The identification system comprises: A data acquisition module is used to receive the image file of the EPG page and obtain the original image data; A color space conversion module, used for performing color space conversion on the original image data to obtain converted HSV color space image data; A color feature filtering module, used to filter the HSV color space image data according to a preset color feature interval; A morphological processing module, used for performing morphological processing on the filtered HSV color space image data to generate a mask image containing a focus area; An edge detection module, used to perform edge detection on the mask image to obtain an edge image of a focus area; A contour detection module, used to perform contour detection on the edge image to obtain a detected contour set; A contour screening module, used for screening the contour set based on preset focus morphological features to obtain a screened focus contour; A focus-annotated image is used to annotate the focus area in the original image data according to the filtered focus contour to obtain a focus-annotated image.

9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for extracting picture contours

    CN103186904A

  • Solar cell panel recognition method based on improved Canny operator and contour area threshold value

    CN107895376A

  • Page focus recognition method and device, computer equipment and storage medium

    CN111968126A

  • Indicator identification method and system based on color gamut and contour features

    CN114066862A

  • Medical image reconstruction method

    CN115082585A

Cited By

  • Focus recognition method and device, computer equipment and computer readable storage medium

    CN121330657A