An image segmentation system for marking ruler and compass drawing assignments

By adjusting the shooting parameters, image quality and segmentation threshold, the problems of poor image quality and insufficient flexibility of traditional image segmentation systems are solved, and more efficient and accurate image segmentation is achieved, improving the efficiency and fairness of correcting ruled drawing operations. sex.

CN118762053BActive Publication Date: 2024-11-08JINAN KEMING DIGITAL TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411244889.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-11-08
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

Traditional image segmentation systems used for ruler drawing work correction are difficult to accurately identify and segment the drawing area when processing image quality is poor, uneven brightness, low contrast, and unobtrusive graphics boundaries, and lack flexibility, resulting in images The segmentation accuracy is low, which affects the efficiency and fairness of the correction.

Method used

The image capture module adjusts the aperture size and ISO sensitivity of the shooting lens, the image quality optimization module adjusts the brightness and contrast, the drawing area recognition module adjusts the image angle and scaling ratio, the image segmentation extraction module dynamically adjusts the segmentation threshold, and according to the color characteristics of the drawing and The handwriting color characteristics perform image segmentation.

Benefits of technology

It improves the accuracy and efficiency of image segmentation, ensures the consistency and fairness of image segmentation results, adapts to different ambient light and handwriting characteristics, and improves the flexibility and accuracy of image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762053B_ABST
    Figure CN118762053B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image segmentation technology, and specifically to an image segmentation system for ruler and compass drawing homework correction, the system comprising an image capture module, an image quality optimization module, a drawing area recognition module and an image segmentation extraction module. The present invention optimizes the capture quality of the work drawing image by adjusting the shooting equipment parameters to adapt to the light intensity of different environments, improves the clarity of the drawing lines by adjusting the brightness and contrast of the drawing image, adjusts the drawing image to a standard size so that the size of the image extracted subsequently can meet the expected standard, and compares it with the preset standard, accurately locates the drawing area that needs to be segmented, and dynamically adjusts the image segmentation threshold according to the color characteristics of the drawing and the color characteristics of the drawing handwriting, effectively separates the ruler and compass work image from the background, improves the accuracy of image segmentation, and optimizes the subsequent homework correction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image segmentation, and in particular to an image segmentation system for correcting ruler drawing work. Background Art

[0002] Image segmentation involves the process of breaking down a digital image into multiple image sub-regions. The purpose of this technique is to simplify or change the representation of an image so that it is easier to analyze. Image segmentation is often used to identify objects or boundaries in an image. Through image segmentation, each part of interest in the image can be separated and processed as a separate entity. In practical applications, image segmentation technology is widely used in medical imaging, machine vision, environmental perception of unmanned vehicles, satellite image analysis, and many more fields that require highly accurate image recognition and processing.

[0003] Among them, the image segmentation system for marking ruler and compass drawing homework uses image segmentation technology to automatically segment and extract students' ruler and compass drawing homework. The system can segment various geometric elements in the image, such as lines, circles and other shapes, and extract them from the image to assist subsequent teachers in marking homework, improve the efficiency of marking homework, and enhance the consistency and fairness of marking.

[0004] When traditional segmentation systems are used to process ruler drawing assignments in the education field, common problems include poor image quality, such as uneven brightness and low contrast, which make the boundaries of the graphics unclear and difficult to accurately identify and segment the drawing area. Traditional methods lack flexibility in the face of diversity in drawing sizes and angles, and cannot automatically adjust images to meet standard sizes. In addition, image segmentation has poor flexibility and is difficult to adapt to different handwriting color depths, resulting in low image segmentation accuracy, affecting the efficiency of homework grading, and also leading to inconsistent grading results and affecting fairness. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose an image segmentation system for marking ruler drawing work.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: an image segmentation system for marking ruler drawing homework, the system comprising:

[0007] The image capture module is based on the ruler drawing work drawing, adjusts the aperture size and ISO sensitivity of the shooting lens according to the ambient light intensity, and adjusts the exposure time to implement image capture and obtain the work drawing image;

[0008] The image quality optimization module analyzes the deviation of the brightness of the drawing image from a predetermined standard based on the work drawing image, adjusts the brightness of the drawing image, and changes the contrast of the drawing image to optimize the quality of the drawing image and the clarity of the drawing lines, thereby obtaining an optimized drawing image;

[0009] The drawing area recognition module adjusts the angle and scaling of the drawing image based on the optimized drawing image, adjusts the drawing image to a standard size, and identifies the drawing area in the drawing image by comparing it with a preset standard drawing area to obtain a drawing area recognition result;

[0010] Based on the drawing area recognition result, the image segmentation and extraction module dynamically adjusts the image segmentation threshold according to the color characteristics of the drawing and the color characteristics of the drawing handwriting, selects the target drawing area, segments the ruler operation image from the background drawing image, and obtains the image segmentation and extraction result.

[0011] The present invention is improved in that the method for adjusting the aperture size and ISO sensitivity of the shooting lens is:

[0012] Based on the ruler drawing drawing, use the light sensor to collect light data and calculate the average value of ambient light intensity. , get the light intensity data;

[0013] Based on the light intensity data, by the formula:

[0014]

[0015] Calculate the adjusted aperture size , and by the formula:

[0016]

[0017] Calculate the adjusted ISO sensitivity , get the adjusted shooting lens parameters, where, and is the adjustment factor, is the mean ambient light intensity, is the base aperture size, is the base ISO sensitivity, is the adjusted aperture size, is the ISO sensitivity after adjustment.

[0018] The present invention is improved in that the steps of obtaining the work drawing image are:

[0019] Based on the light intensity data, by the formula:

[0020]

[0021] Calculate the ambient light impact factor ,in, Represents the average value of ambient light intensity, Indicates the environmental lighting impact factor;

[0022] Based on the environmental lighting influence factor , adjusted aperture size and adjusted ISO sensitivity , through the formula:

[0023]

[0024] Calculate the adjusted exposure time ,in, is the adjustment factor, represents the environmental lighting influence factor, is the adjusted aperture size, is the adjusted ISO sensitivity, is the basic exposure time, is the adjusted exposure time;

[0025] Based on the adjusted exposure time , implement image capture and obtain the work drawing image.

[0026] The present invention is improved in that the method for adjusting the brightness of the drawing image is:

[0027] Based on the work drawing image, the average brightness of the drawing image is calculated by averaging the grayscale values ​​of the image pixels and comparing it with the predetermined standard brightness. The formula is:

[0028]

[0029] Calculate brightness deviation ,in is the predetermined standard brightness, is the average brightness of the drawing image, Indicates brightness deviation;

[0030] Based on the brightness deviation , through the formula:

[0031]

[0032] Calculate the adjusted image brightness , get the image brightness adjustment information, where, is the average brightness of the drawing image, Indicates brightness deviation, is the linear adjustment coefficient, and is the regulating factor, is the adjusted image brightness.

[0033] The present invention is improved in that the step of obtaining the optimized drawing image is:

[0034] Based on the image brightness adjustment information, by analyzing the color gradient of pixels, the edge strength of lines in the drawing image is extracted, and a preset edge strength threshold is obtained to obtain contrast correlation data;

[0035] Based on the contrast correlation data, by the formula:

[0036]

[0037] Calculate the adjusted image contrast to obtain the optimized drawing image, where: is the current image contrast, is the adjusted contrast, is the line edge strength, is the edge strength threshold, is the linear coefficient for contrast adjustment, is the constant for smoothing adjustment, To adjust the response rate.

[0038] The present invention is improved in that the method for adjusting the drawing image to a standard size is:

[0039] Based on the optimized drawing image, extract the current angle and size of the drawing image, and collect the preset standard image size and angle to obtain image adjustment related data;

[0040] Adjust the associated data based on the image, by the formula:

[0041]

[0042] Calculate the angle adjustment , and by the formula:

[0043]

[0044] Calculate resizing ratio ,in, and is the adjustment parameter, is the current angle of the drawing image, is the size of the current image, is the preset standard angle. For the preset standard size, is the angle adjustment amount, To adjust the size ratio, is the proportional adjustment coefficient, is the offset;

[0045] Based on the angle adjustment and resize ratio , rotate the image and adjust the image scale to obtain the corrected drawing image.

[0046] The present invention is improved in that the method for dynamically adjusting the image segmentation threshold is:

[0047] Based on the drawing area recognition result, the average color intensity of the drawing handwriting in the drawing image is obtained, and the average color intensity of the background drawing is collected to obtain color intensity data;

[0048] Based on the color intensity data, by the formula:

[0049]

[0050] Calculating the base threshold ,in, is the average intensity of the drawing handwriting color, is the average color intensity of the background drawing, is the basic threshold;

[0051] Based on the basic threshold , through the formula:

[0052]

[0053] Calculate the adjusted segmentation threshold , get the segmentation threshold adjustment information, where, , , and is the adjustment factor, is the adjusted segmentation threshold, is the deviation measure of contrast, is the basic threshold.

[0054] The present invention is improved in that the steps of obtaining the image segmentation and extraction results are:

[0055] Based on the mapping area recognition result, the formula is:

[0056]

[0057] Calculate the edge index of each pixel in the image ,in, and are the gradients of the image in the x and y directions, , and is the adjustment parameter, is the edge index;

[0058] Based on the adjusted segmentation threshold and edge index ,Will Pixels with values ​​exceeding the Y value are marked as image edges. The marked edges are used as segmentation lines to extract the ruler and compass operation image and obtain image segmentation and extraction results.

[0059] Compared with the prior art, the advantages and positive effects of the present invention are:

[0060] In the present invention, by adjusting the shooting equipment parameters to adapt to the light intensity of different environments, the capture quality of the work drawing image is optimized, by adjusting the brightness and contrast of the drawing image, the clarity of the drawing lines is improved, by adjusting the drawing image to a standard size, the size of the subsequently extracted image can meet the expected standard and be compared with the preset standard, the drawing area to be segmented is accurately located, and according to the color characteristics of the drawing and the color characteristics of the drawing handwriting, the image segmentation threshold is dynamically adjusted to effectively separate the ruler and compass work image from the background, thereby improving the accuracy of image segmentation and optimizing the subsequent work correction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is a system flow chart of the present invention;

[0062] Figure 2 A flow chart of adjusting the aperture size and ISO sensitivity of a shooting lens according to the present invention;

[0063] Figure 3 A flow chart for obtaining a work drawing image of the present invention;

[0064] Figure 4 A flow chart for adjusting the brightness of a drawing image according to the present invention;

[0065] Figure 5 A flow chart for obtaining an optimized drawing image for the present invention;

[0066] Figure 6 A flow chart for adjusting a drawing image to a standard size according to the present invention;

[0067] Figure 7 A flowchart of dynamically adjusting the image segmentation threshold value of the present invention;

[0068] Figure 8 The present invention is a flowchart for obtaining image segmentation and extraction results. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0070] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0071] See also Figure 1 The present invention provides a technical solution: an image segmentation system for correcting ruler drawing homework, the system comprising:

[0072] The image capture module is based on the ruler drawing work drawing, adjusts the aperture size and ISO sensitivity of the shooting lens according to the ambient light intensity, and adjusts the exposure time to implement image capture and obtain the work drawing image;

[0073] The image quality optimization module analyzes the deviation of the brightness of the drawing image from the predetermined standard based on the working drawing image, adjusts the brightness of the drawing image, and changes the contrast of the drawing image to optimize the quality of the drawing image and the clarity of the drawing lines, and obtains the optimized drawing image;

[0074] The drawing area recognition module adjusts the angle and scaling of the drawing image based on the optimized drawing image, adjusts the drawing image to a standard size, and identifies the drawing area in the drawing image by comparing it with a preset standard drawing area, thereby obtaining a drawing area recognition result;

[0075] The image segmentation and extraction module is based on the drawing area recognition results and the color characteristics of the drawing and the drawing handwriting. It dynamically adjusts the image segmentation threshold, selects the target drawing area, and segments the ruler and compass image from the background drawing image to obtain the image segmentation and extraction results.

[0076] The work drawing image is specifically an image after adjustment of lighting balance, focal length optimization and exposure time optimization. The optimized drawing image includes the adjusted brightness value, contrast index and image clarity. The drawing area recognition result includes the standardized image size, the corrected image angle and the recognized drawing boundary. The image segmentation and extraction results include the segmented image area, color classification accuracy and segmentation edge clarity.

[0077] See also Figure 2 , the method to adjust the aperture size and ISO sensitivity of the shooting lens is:

[0078] Based on the ruler drawing drawing, use the light sensor to collect light data and calculate the average value of ambient light intensity. , get the light intensity data;

[0079] Based on the light intensity data, through the formula:

[0080]

[0081] Calculate the adjusted aperture size , and by the formula:

[0082]

[0083] Calculate the adjusted ISO sensitivity , get the adjusted shooting lens parameters, where, and is the adjustment factor, is the mean ambient light intensity, is the base aperture size, is the base ISO sensitivity, is the adjusted aperture size, is the ISO sensitivity after adjustment.

[0084] formula:

[0085]

[0086] and

[0087]

[0088] Parameter details and how to obtain them:

[0089] It is the real-time average of the ambient light intensity, the light intensity data measured by the light sensor The sensor collects data at regular intervals and uses the arithmetic mean to calculate the average of all data points to represent the average light level of the current environment.

[0090] Basic aperture size and base ISO sensitivity It is the initial setting value under standard lighting conditions. The value is usually determined through laboratory testing and field commissioning to ensure the best image quality under controlled variable conditions. and Usually set to standard settings recommended by the camera manufacturer or determined through prior experience of professional photographers.

[0091] Adjustment factor and It is determined through laboratory testing and field data analysis to optimize the adjustment process of aperture and ISO sensitivity. The coefficient reflects the sensitivity of aperture and ISO to changes in light. Its optimal value is determined through multiple experiments to meet the needs of different shooting environments.

[0092] Calculation example:

[0093] Set the current ambient light intensity The measured value is Lux, calculate its real-time mean :

[0094]

[0095] Set the base aperture size f-stop, base ISO sensitivity , adjustment coefficient and .

[0096] Calculate the adjusted aperture size and ISO sensitivity :

[0097]

[0098]

[0099]

[0100]

[0101]

[0102]

[0103] The adjusted aperture size is approximately 2.85f-stop and the ISO sensitivity is increased to 110, which means that in an environment with an actual light intensity of 100lux, the camera settings are fine-tuned to capture better quality images through adjustment.

[0104] See also Figure 3 , the steps to obtain the job drawing image are:

[0105] Based on the light intensity data, through the formula:

[0106]

[0107] Calculate the ambient light impact factor ,in, Represents the average value of ambient light intensity, Indicates the environmental lighting impact factor;

[0108] Based on the influence factor of ambient light , adjusted aperture size and adjusted ISO sensitivity , through the formula:

[0109]

[0110] Calculate the adjusted exposure time ,in, is the adjustment factor, represents the environmental lighting influence factor, is the adjusted aperture size, is the adjusted ISO sensitivity, is the basic exposure time, is the adjusted exposure time;

[0111] Based on the adjusted exposure time , implement image capture and obtain the work drawing image.

[0112] formula:

[0113]

[0114] and

[0115]

[0116] Parameter details and how to obtain them:

[0117] Average ambient light intensity , calculated by continuously monitoring the light intensity through a light sensor. The sensor collects light data at a specific time interval and then calculates the arithmetic mean of the data.

[0118] Basic exposure time It is the initial exposure time setting obtained through experiments in a controlled lighting environment, usually determined according to the camera's default settings or through the photographer's experience.

[0119] Adjustment factor Determined through laboratory testing and on-site debugging, it is used to optimize exposure time calculation and ensure uniform exposure of images in different environments.

[0120] Calculation example:

[0121] Set the real-time average value of ambient light intensity Lux, calculate the lighting impact factor :

[0122]

[0123] Setting the adjustment factor , basic exposure time Seconds, aperture size , ISO sensitivity .

[0124] Calculate exposure time process:

[0125]

[0126] Compute the logarithmic part in the denominator:

[0127]

[0128] Calculate the f-stop squared portion of the denominator:

[0129]

[0130] Compute the total product of the denominators:

[0131]

[0132] Calculate exposure time :

[0133]

[0134] Adjusted exposure time Approx. seconds, indicating that under the condition of an ambient light intensity of 200 lux, the exposure time needs to be shortened. The adjustment of the exposure time is more suitable for the current ambient light conditions and helps to obtain better image quality.

[0135] See also Figure 4 , the method to adjust the brightness of the drawing image is:

[0136] Based on the work drawing image, the average brightness of the drawing image is calculated by averaging the grayscale values ​​of the image pixels and compared with the predetermined standard brightness through the formula:

[0137]

[0138] Calculate brightness deviation ,in is the predetermined standard brightness, is the average brightness of the drawing image, Indicates brightness deviation;

[0139] Based on brightness deviation , through the formula:

[0140]

[0141] Calculate the adjusted image brightness , get the image brightness adjustment information, where, is the average brightness of the drawing image, Indicates brightness deviation, is the linear adjustment coefficient, and is the regulating factor, is the adjusted image brightness.

[0142] formula:

[0143]

[0144] Parameter details and how to obtain them:

[0145] It is the current average brightness of the drawing image, obtained by arithmetic averaging the grayscale values ​​of the image pixels. The parameter is obtained directly from the image data, ensuring that the basis for brightness calculation is the actual image brightness.

[0146] It is a predetermined standard brightness, usually set according to the standards of a specific industry or preliminary design requirements. The standard value is extracted from the design specification or customer requirements document.

[0147] It is a linear adjustment coefficient that determines the basic amplitude of brightness adjustment. The coefficient is obtained based on experiments or previous image processing experience to match the improvement requirements of specific image quality.

[0148] and These two parameters jointly control the nonlinear response of brightness adjustment. The parameters are determined through adjustment tests to ensure that the ideal adjustment effect can be obtained under different brightness deviations.

[0149] Calculation example:

[0150] Set the current average brightness of the drawing image , the predetermined standard brightness , the brightness deviation is obtained by calculation:

[0151]

[0152] Set the linear adjustment coefficient , nonlinear adjustment parameter and .

[0153] Calculate the adjusted brightness:

[0154]

[0155] Calculate the value of the exponential part:

[0156]

[0157] Calculate the denominator:

[0158]

[0159] Calculate the brightness adjustment as:

[0160]

[0161] Adjusted brightness for:

[0162]

[0163] The brightness of the adjusted image is 164.67, which is higher than the current brightness and closer to the predetermined standard brightness, indicating that the adopted adjustment method effectively improves the brightness of the image to meet design or visual requirements.

[0164] See also Figure 5 , the steps to obtain the optimized drawing image are:

[0165] Based on the image brightness adjustment information, the edge strength of the lines in the drawing image is extracted by analyzing the color gradient of the pixels, and a preset edge strength threshold is obtained to obtain contrast correlation data;

[0166] Based on the contrast correlation data, the formula is:

[0167]

[0168] Calculate the adjusted image contrast to obtain the optimized drawing image, where: is the current image contrast, is the adjusted contrast, is the line edge strength, is the edge strength threshold, is the linear coefficient for contrast adjustment, is the constant for smoothing adjustment, To adjust the response rate.

[0169] formula:

[0170]

[0171] Parameter details and how to obtain them:

[0172] : The current strength of the line edge, calculated by an edge detection algorithm. Edge detection algorithms (such as Sobel or Canny) analyze the pixel contrast around each pixel in the image, calculate the gradient size, and obtain the edge strength value.

[0173] : The threshold of edge strength is used to distinguish between clear and blurred lines in an image. The threshold is determined based on image processing standards or experience to ensure that important details in the image can be identified and enhanced.

[0174] : The current image contrast, usually obtained directly from image processing software or analysis tools, represents the brightness ratio between the brightest and darkest parts of the image.

[0175] : Linear coefficient of contrast adjustment, used to determine the basic adjustment range. The coefficient is set based on experiments or previous image processing experience to meet different types of image quality improvement needs.

[0176] : A constant for smooth adjustment. The coefficient is set based on experiments or previous image processing experience. It helps control the shape of the adjustment curve to smoothly transition contrast changes and avoid unnatural effects after image processing.

[0177] : Adjust the response rate to control the reaction speed of contrast adjustment. The coefficient is set based on experiments or previous image processing experience to ensure a faster response to larger edge intensity deviations.

[0178] Calculation example:

[0179] Sets the current edge strength of the image , edge intensity threshold , current contrast .

[0180] Setting adjustment parameters , smoothing constant , rate constant .

[0181] Calculate the edge strength deviation:

[0182]

[0183] Calculate the exponential part:

[0184]

[0185] Calculate the denominator:

[0186]

[0187] Calculate the contrast adjustment factor:

[0188]

[0189] Adjusted contrast:

[0190] In this example, the adjusted contrast is 1.193, which means that the contrast has been calculated to be increased by approximately 19.3%, which helps to improve the clarity of the lines in the image, making the lines more distinct and improving the overall visual quality of the drawing.

[0191] See also Figure 6 , the method to adjust the drawing image to the standard size is:

[0192] Based on the optimized drawing image, the current angle and size of the drawing image are extracted, and the preset standard image size and angle are collected to obtain image adjustment related data;

[0193] Adjust the associated data based on the image, through the formula:

[0194]

[0195] Calculate the angle adjustment , and by the formula:

[0196]

[0197] Calculate resizing ratio ,in, and is the adjustment parameter, is the current angle of the drawing image, is the size of the current image, is the preset standard angle. For the preset standard size, is the angle adjustment amount, To adjust the size ratio, is the proportional adjustment coefficient, is the offset;

[0198] Based on the angle adjustment and resize ratio , rotate the image and adjust the image scale to obtain the corrected drawing image.

[0199] formula:

[0200]

[0201] Parameter details and how to obtain them

[0202] : The current angle of the drawing image is calculated through image processing algorithms such as edge detection combined with Hough transform. By analyzing the straight lines in the image, the direction of the straight lines is determined and the tilt angle of the entire image is inferred.

[0203] : The dimensions of the current image, which can be read directly from the image file's metadata or estimated by measuring the dimensions of known objects in the image. The dimensions are usually given in pixels, but can also be converted to actual physical dimensions.

[0204] and : Preset standard angles and sizes, defined by design specifications or project requirements documents. Standard parameters guide the image adjustment process, ensuring that the output meets specific technical or visual requirements.

[0205] and : Parameters are set to enhance the flexibility and precision of adjustment. is the proportional adjustment coefficient, which affects the magnitude of size adjustment; is an offset used to optimize the precision and responsiveness of resizing.

[0206] Calculation example:

[0207] Set the current angle of the image and current size Pixels, standard angle and standard sizes Pixels, adjustment factor and offset .

[0208] Calculate the required angle adjustment:

[0209]

[0210] Calculate the resizing ratio:

[0211]

[0212] In the calculation example, the angle needs to be adjusted by -5° to correct the tilt of the image, and the size needs to be proportional Adjustment, that is, the image size needs to be enlarged by about 41.18% to reach the standard size, and the drawing image will be adjusted to the appropriate size, thus ensuring its adaptability to use and the accuracy of the image.

[0213] See also Figure 7 , the method to dynamically adjust the image segmentation threshold is:

[0214] Based on the drawing area recognition result, the average color intensity of the drawing handwriting in the drawing image is obtained, and the average color intensity of the background drawing is collected to obtain color intensity data;

[0215] Based on the color intensity data, by the formula:

[0216]

[0217] Calculating the base threshold ,in, is the average intensity of the drawing handwriting color, is the average color intensity of the background drawing, is the basic threshold;

[0218] Based on basic threshold , through the formula:

[0219]

[0220] Calculate the adjusted segmentation threshold , get the segmentation threshold adjustment information, where, , , and is the adjustment factor, is the adjusted segmentation threshold, is the deviation measure of contrast, is the basic threshold.

[0221] formula:

[0222]

[0223] and

[0224]

[0225] Parameter details and how to obtain them

[0226] :The basic image segmentation threshold calculated based on the color characteristics of the drawing handwriting and background in the drawing image. By analyzing the average color intensity of the drawing handwriting in the drawing image and the average color intensity of the background drawing , Determined by taking the average of these two color intensities.

[0227] , , and : is the coefficient that controls the influence of the basic threshold, which is set according to previous image processing experience or experimental data. It is the main coefficient for adjusting the threshold, controlling the amplitude of the adjustment, and is usually set based on previous image processing experience or experimental data. and are nonlinear adjustment parameters used to control the response curve of threshold adjustment. These parameters are adjusted according to the specific characteristics of the image and the required segmentation accuracy.

[0228] Represents a deviation metric based on the local contrast of an image, usually calculated by comparing the local contrast of an image region with the global average contrast.

[0229] Calculation example:

[0230] Set the average color intensity of the drawing strokes in the drawing image and the average color intensity of the background drawing .

[0231] Calculate the basic segmentation threshold :

[0232]

[0233] Setting the adjustment factor , , , nonlinear adjustment parameter and .

[0234] Calculate segmentation threshold :

[0235]

[0236] Calculate the exponential function part:

[0237]

[0238] Calculate the denominator:

[0239]

[0240] Fraction calculation:

[0241]

[0242] calculate :

[0243]

[0244] Adjusted segmentation threshold for ,In this way, the drawing area can be separated from the background area more ,accurately, which is helpful for subsequent image analysis and ,processing.

[0245] See also Figure 8 , the steps to obtain the image segmentation and extraction results are:

[0246] Based on the results of mapping area recognition, the formula is:

[0247]

[0248] Calculate the edge index of each pixel in the image ,in, and are the gradients of the image in the x and y directions, , and is the adjustment parameter, is the edge index;

[0249] Based on the adjusted segmentation threshold and edge index ,Will Pixels with values ​​exceeding the Y value are marked as image edges. The marked edges are used as segmentation lines to extract the ruler and compass operation image and obtain image segmentation and extraction results.

[0250] formula:

[0251]

[0252] Parameter details and how to obtain them:

[0253] and : and The gradients of the image in the x and y directions are calculated from the pixel differences of the grayscale image. The gradient is obtained by applying the Sobel operator or other similar operators to each pixel of the image, and characterizes the rate at which the brightness of the image changes in each direction.

[0254] , and : , It is a parameter used to adjust the response and sensitivity of edge detection. The parameter is adjusted according to the characteristics of the image and the required segmentation accuracy to optimize the edge detection results. is a logarithmic weight that enhances the response to subtle edge changes, especially in areas of lower contrast.

[0255] Calculation example:

[0256] Set to process an image, gradient value and .

[0257] Setting parameters , ,and .

[0258] Calculate edge strength :

[0259]

[0260] Compute the sum of squared gradients of the basis:

[0261]

[0262] Compute the power of the weighted sum of squared gradients:

[0263]

[0264] Compute the logarithmic term, taking the natural logarithm:

[0265]

[0266]

[0267]

[0268]

[0269] calculate :

[0270]

[0271]

[0272]

[0273]

[0274] Calculated edge strength Approximately , this value represents the edge index of the point in the image. The value indicates that the location is a significant edge, which helps the image segmentation algorithm to identify and extract the target area, and can effectively segment the target mapping area from the background area, ensuring the effective extraction of the mapping area and providing a clear image for subsequent processing and analysis.

[0275] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. An image segmentation system for marking ruler drawing assignments, characterized in that: The system comprises: The image capture module is based on the ruler drawing work drawing, adjusts the aperture size and ISO sensitivity of the shooting lens according to the ambient light intensity, and adjusts the exposure time to implement image capture and obtain the work drawing image; The image quality optimization module analyzes the deviation of the brightness of the drawing image from a predetermined standard based on the work drawing image, adjusts the brightness of the drawing image, and changes the contrast of the drawing image to optimize the quality of the drawing image and the clarity of the drawing lines, thereby obtaining an optimized drawing image; The drawing area recognition module adjusts the angle and scaling of the drawing image based on the optimized drawing image, adjusts the drawing image to a standard size, and identifies the drawing area in the drawing image by comparing it with a preset standard drawing area to obtain a drawing area recognition result; The image segmentation and extraction module dynamically adjusts the image segmentation threshold based on the drawing area recognition result and the color characteristics of the drawing and the drawing handwriting, selects the target drawing area, and segments the ruler and compass work image from the background drawing image to obtain the image segmentation and extraction result; The method for dynamically adjusting the image segmentation threshold is: Based on the drawing area recognition result, the average color intensity of the drawing handwriting in the drawing image is obtained, and the average color intensity of the background drawing is collected to obtain color intensity data; Based on the color intensity data, by the formula: Calculating the base threshold ,in, is the average intensity of the drawing handwriting color, is the average color intensity of the background drawing, is the basic threshold; Based on the basic threshold , through the formula: Calculate the adjusted segmentation threshold , get the segmentation threshold adjustment information, where, , , and is the adjustment factor, is the adjusted segmentation threshold, is the deviation measure of contrast, is the basic threshold.

2. The image segmentation system for marking ruler drawing work according to claim 1, characterized in that: The method for adjusting the aperture size and ISO sensitivity of the shooting lens is: Based on the ruler drawing drawing, use the light sensor to collect light data and calculate the average value of ambient light intensity. , get the light intensity data; Based on the light intensity data, by the formula: Calculate the adjusted aperture size , and by the formula: Calculate the adjusted ISO sensitivity , get the adjusted shooting lens parameters, where, and is the adjustment factor, is the mean ambient light intensity, is the base aperture size, is the base ISO sensitivity, is the adjusted aperture size, is the ISO sensitivity after adjustment.

3. The image segmentation system for marking ruler drawing work according to claim 2, characterized in that: The steps of obtaining the work drawing image are as follows: Based on the light intensity data, by the formula: Calculate the ambient light impact factor ,in, Represents the average value of ambient light intensity, Indicates the environmental lighting impact factor; Based on the environmental lighting influence factor , adjusted aperture size and adjusted ISO sensitivity , through the formula: Calculate the adjusted exposure time ,in, is the adjustment factor, represents the environmental lighting influence factor, is the adjusted aperture size, is the adjusted ISO sensitivity, is the basic exposure time, is the adjusted exposure time; Based on the adjusted exposure time , implement image capture and obtain the work drawing image.

4. The image segmentation system for marking ruler drawing work according to claim 1, characterized in that: The method for adjusting the brightness of the drawing image is: Based on the work drawing image, the average brightness of the drawing image is calculated by averaging the grayscale values ​​of the image pixels and comparing it with the predetermined standard brightness. The formula is: Calculate brightness deviation ,in is the predetermined standard brightness, is the average brightness of the drawing image, Indicates brightness deviation; Based on the brightness deviation , through the formula: Calculate the adjusted image brightness , get the image brightness adjustment information, where, is the average brightness of the drawing image, Indicates brightness deviation, is the linear adjustment coefficient, and is the regulating factor, is the adjusted image brightness.

5. The image segmentation system for marking ruler drawing work according to claim 4, characterized in that: The steps for obtaining the optimized drawing image are as follows: Based on the image brightness adjustment information, by analyzing the color gradient of pixels, the edge strength of lines in the drawing image is extracted, and a preset edge strength threshold is obtained to obtain contrast correlation data; Based on the contrast correlation data, by the formula: Calculate the adjusted image contrast to obtain the optimized drawing image, where: is the current image contrast, is the adjusted contrast, is the line edge strength, is the edge strength threshold, is the linear coefficient for contrast adjustment, is the constant for smoothing adjustment, To adjust the response rate.

6. The image segmentation system for marking ruler drawing work according to claim 1, characterized in that: The method for adjusting the drawing image to a standard size is: Based on the optimized drawing image, extract the current angle and size of the drawing image, and collect the preset standard image size and angle to obtain image adjustment related data; Adjust the associated data based on the image, by the formula: Calculate the angle adjustment , and by the formula: Calculate resizing ratio ,in, and is the adjustment parameter, is the current angle of the drawing image, is the size of the current image, is the preset standard angle. For the preset standard size, is the angle adjustment amount, To adjust the size ratio, is the proportional adjustment coefficient, is the offset; Based on the angle adjustment and resize ratio , rotate the image and adjust the image scale to obtain the corrected drawing image.

7. The image segmentation system for marking ruler drawing work according to claim 1, characterized in that: The steps of obtaining the image segmentation extraction result are: Based on the mapping area recognition result, the formula is: Calculate the edge index of each pixel in the image ,in, and are the gradients of the image in the x and y directions, , and is the adjustment parameter, is the edge index; Based on the adjusted segmentation threshold and edge index ,Will Pixels with values ​​exceeding the Y value are marked as image edges. The marked edges are used as segmentation lines to extract the ruler and compass operation image and obtain image segmentation and extraction results.

Citation Information

Patent Citations

  • Image processing method and device, equipment and storage medium

    CN112381743A

  • Automatic correction system and method for ruler drawing paper homework

    CN118072334A

  • Image analysis method and system based on deep learning

    CN118429242A

  • Object detecting device, object detecting method, and program

    WO2024071347A1