A fish peptone decolorization process monitoring system and method using computer vision
By using three-channel image acquisition and overall translation modeling based on computer vision, the problems of light and liquid surface disturbance during the decolorization process of fish peptone were solved, achieving stable and real-time monitoring of the decolorization process and improving the accuracy and reliability of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZIBO JINYUAN BIOTECHNOLOGY CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-03
AI Technical Summary
Existing methods for monitoring the decolorization process of fish peptone suffer from detection lag, sensitivity to changes in light, and significant impact from liquid surface disturbances, leading to unstable judgment of the degree of decolorization. They also lack quantitative characterization in the time dimension, making it difficult to achieve continuous and reliable endpoint determination.
Using computer vision methods, through three-channel image acquisition and brightness consistency calibration, the liquid surface disturbance is aligned by overall translation modeling, a two-dimensional chromaticity vector is constructed, and combined with stability threshold judgment, the decolorization process is monitored in real time.
Stable and reliable monitoring of the decolorization process under conditions of light variation and liquid surface disturbance has been achieved, improving the real-time performance and accuracy of detection, reducing computational complexity, and ensuring the reliability and stability of online monitoring.
Smart Images

Figure CN122335683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and image processing technology, specifically to a monitoring system and method for fish peptone decolorization process using computer vision. Background Technology
[0002] Fish peptone is an important raw material for bio-fermentation, and its decolorization process directly affects the purity and color stability of downstream products. In current production processes, monitoring the degree of fish peptone decolorization mainly relies on manual sampling and colorimetric analysis, laboratory spectrophotometric analysis, or simple online color sensors. These methods generally suffer from problems such as detection lag, inability to continuously reflect process dynamics, and high dependence on operator subjective judgment, making it difficult to timely and objectively characterize changes in liquid color within a continuous drum reactor.
[0003] With the development of industrial vision technology, some solutions have attempted to use industrial cameras to photograph the liquid surface in reactors, estimating the degree of decolorization through image grayscale values, single-channel brightness, or simple color histograms. However, these methods typically only perform grayscale conversion, binarization, or simple thresholding of the original RGB image, without normalizing the overall brightness changes between frames caused by camera exposure fluctuations and light source intensity drift. This leads to an overall shift in image features when lighting conditions change in the production environment, resulting in unstable or even significant deviations in the judgment of the degree of decolorization. On the other hand, the fish peptone decolorization process often occurs inside continuous drum reactors, where the liquid surface is affected by the rotation of the drum and local disturbances, resulting in overall translation, slight shaking, and even local ripples. Existing image-based monitoring methods often assume that the monitored area is in a static state, directly comparing color or grayscale values at the same pixel position in adjacent frames without compensating for the overall displacement of the liquid surface over time. This leads to misjudging flow field disturbances as color changes, reducing the reliability of decolorization process monitoring. Furthermore, most models directly use the original RGB values or a certain color space component, failing to construct a representation insensitive to brightness changes from the perspective of separating chroma and luminance, and also failing to incorporate the stability of color changes over time for endpoint determination. In existing technologies, the determination of the decolorization endpoint is mostly based on whether the color value at a certain moment or the short-term average value is below a given threshold, lacking a quantitative characterization of the characteristic that the decolorization process tends to stabilize over time, and failing to establish clear mathematical criteria for the continuous reduction and maintenance of the change amplitude within a stable range.
[0004] Therefore, this case aims to propose a monitoring system and method for fish peptone decolorization process using computer vision. It utilizes a monocular industrial camera above a continuous rotary drum reactor to acquire multi-channel color images and perform brightness consistency calibration. It achieves precise alignment of the liquid surface position through cross-frame overall translation modeling, then constructs a two-dimensional chromaticity vector, extracts the main direction of pixel chromaticity change and quantifies its projected decolorization amount, and combines discrete accumulation and stability threshold judgment to determine in real time whether the decolorization process has reached a stable final state. Summary of the Invention
[0005] This invention provides a monitoring system and method for fish peptone decolorization process using computer vision, which helps to solve the problems mentioned in the background art.
[0006] This invention provides the following technical solution: a method for monitoring the fish peptone decolorization process using computer vision, comprising: Three-channel images of the fish peptone liquid surface above the reactor were acquired. Consistency calibration was performed on the brightness of the liquid surface pixels at each sampling time to generate a brightness-normalized image sequence. Between adjacent sampling times, the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set were obtained through global translation modeling and displacement search. Based on the overall perturbation displacement vector of the fish peptone liquid surface, displacement compensation was performed on the brightness-normalized image of the next sampling time, constructing a reference image pair for adjacent sampling times within the effective pixel set. A two-dimensional chromaticity vector of the liquid surface pixels was constructed from the reference image pair. Based on the difference in the two-dimensional chromaticity vectors of pixels within the effective pixel set at adjacent sampling times, the chromaticity vectors of the effective pixel set were calculated. The average chromaticity change intensity is calculated by averaging the two-dimensional chromaticity change vectors of the pixels within the effective pixel set to obtain the average chromaticity change vector and the unit principal direction vector. The two-dimensional chromaticity change vectors of each pixel within the effective pixel set are projected onto the unit principal direction vector, and the projection scalars of each pixel are averaged to form a principal direction projection decolorization time series. The decolorization change amount and decolorization change stability index are discretely accumulated on the principal direction projection decolorization time series. A decolorization change stability threshold is constructed based on the reference sampling time set. When the decolorization change stability index of consecutive sampling times does not exceed the decolorization change stability threshold, the fish peptone decolorization process is determined to have reached a stable final state.
[0007] Optionally, the three-channel image of the fish peptone liquid surface above the reactor is acquired, and the pixel brightness of the liquid surface at each sampling time is calibrated for consistency to generate a brightness-normalized image sequence, specifically including: A monocular industrial camera is fixedly installed above the continuous rotary drum reactor. The number of pixels in the horizontal and vertical directions of the camera imaging plane is set, the sampling period is set, and a two-dimensional pixel coordinate system is established on the camera imaging plane with the upper left corner of the fish peptone liquid surface projection area as the origin. The horizontal pixel index is increased sequentially from zero to the right, and the vertical pixel index is increased sequentially from zero to the bottom. At each sampling time, a color image containing the red, green and blue channels is acquired. For each pixel in the fish peptone liquid surface projection area, the grayscale value in the red, green and blue channels at the current sampling time is recorded, and all pixel positions belonging to the fish peptone liquid surface projection area are combined into a liquid surface pixel set. At each sampling time, for all pixels in the liquid surface pixel set, the gray values of each pixel in the red, green and blue channels are accumulated in the liquid surface pixel set to obtain the total brightness of the fish peptone liquid surface projection area and the number of pixels in the liquid surface pixel set at the current sampling time. The total brightness is divided by the number of pixels to obtain the average total brightness of the fish peptone liquid surface projection area at the current sampling time. At the initial sampling time when the system starts monitoring, the average total brightness of the fish peptone liquid surface projection area at the initial sampling time is used as the baseline average total brightness. At each subsequent sampling time, the average total brightness at the current sampling time is compared with the value 1. When the average total brightness is not lower than 1, the current average total brightness is used as the corrected average total brightness at the current sampling time. When the average total brightness is lower than 1, 1 is used as the corrected average total brightness at the current sampling time. At each sampling time, for each pixel in the liquid surface pixel set, the grayscale values on the red, green, and blue channels are multiplied by the ratio of the baseline average total brightness to the corrected average total brightness at the current sampling time, respectively, to obtain the brightness normalized grayscale values on the red, green, and blue channels.
[0008] Optionally, the step of obtaining the overall perturbation displacement vector and effective pixel set of the fish peptone liquid surface between adjacent sampling times through overall translation modeling and displacement search specifically includes: Between two adjacent sampling times, the perturbation of the fish peptone liquid surface in the image plane is modeled as an overall integer displacement in the horizontal and vertical directions. Candidate displacement values are set in the integer range of negative three to positive three in the horizontal and vertical directions respectively. Any candidate displacement in the horizontal direction is combined with any candidate displacement in the vertical direction to form a set of overall displacement candidate combinations. For each overall displacement candidate combination, within the liquid surface pixel set, for each pixel position, determine whether the new pixel position corresponding to the pixel position after applying the overall displacement candidate combination still belongs to the liquid surface pixel set. Pixel positions that belong to the liquid surface pixel set before and after the displacement are combined into the effective pixel set of the corresponding overall displacement candidate combination, and count the number of pixels in the effective pixel set. For each group of valid pixel sets with a number of pixels greater than zero, in the brightness normalized images at the current sampling time and the next sampling time, for each pixel position in the valid pixel set, calculate the difference between the brightness normalized gray value at the current sampling time and the corresponding pixel brightness normalized gray value after translation by the overall displacement candidate combination at the next sampling time in the red, green and blue channels respectively. Square the differences of the three channels respectively and add them together to obtain the sum of squares of brightness difference of the pixel under the corresponding overall displacement candidate combination. Then, accumulate the sum of squares of brightness difference within the valid pixel set to obtain the cross-frame brightness difference sum of square error value of the corresponding overall displacement candidate combination. Among all candidate displacement combinations with a number of pixels greater than zero in the set of all valid pixels, compare the sum of squared errors of the cross-frame brightness difference corresponding to each candidate displacement combination, select the candidate displacement combination with the smallest sum of squared errors of the cross-frame brightness difference, take the candidate integer displacement in the horizontal direction of the candidate displacement combination corresponding to the smallest error as the horizontal component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, take the candidate integer displacement in the vertical direction of the candidate displacement combination corresponding to the smallest error as the vertical component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, and take the set of valid pixels corresponding to the smallest error as the set of valid pixels at the current sampling time. When the number of pixels in the effective pixel set corresponding to all candidate combinations of overall displacement is equal to zero, the horizontal component of the overall disturbance displacement vector of the fish peptone liquid surface at the current sampling time is set to zero, the vertical component is set to zero, and the liquid surface pixel set is taken as the effective pixel set at the current sampling time.
[0009] Optionally, the step of performing displacement compensation on the brightness-normalized image at the next sampling time based on the overall perturbation displacement vector of the fish peptone liquid surface, and constructing a reference image pair for adjacent sampling times within the effective pixel set, specifically includes: Between any current sampling time and the next sampling time, obtain the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set corresponding to the current sampling time. In the brightness normalized image of the next sampling time, for each pixel position belonging to the effective pixel set, according to the horizontal and vertical components of the overall perturbation displacement vector, perform an integer translation on the coordinates of the pixel position. Assign the brightness normalized gray value at the translated position to the pixel position in the effective pixel set of the current sampling time to form an aligned brightness normalized image. For each pixel location belonging to the valid pixel set, obtain the normalized grayscale value of the pixel corresponding to the pixel location in the red, green, and blue channels in the normalized image at the current sampling time. Obtain the normalized grayscale value of the same pixel location in the red, green, and blue channels in the aligned normalized image. Combine the normalized grayscale values of the same pixel location and the same color channel at the two sampling times into a reference image pair.
[0010] Optionally, constructing the two-dimensional chromaticity vector of the liquid surface pixels from the reference image pair specifically includes: At any sampling time, for each pixel in the liquid surface pixel set, the normalized gray values of the brightness in the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the current sampling time; For each pixel, at the current sampling time, the total brightness of the pixel is compared with the value 1. When the total brightness is not less than 1, the total brightness is used as the corrected total brightness of the pixel at the current sampling time. When the total brightness is less than 1, 1 is used as the corrected total brightness of the pixel at the current sampling time. For each pixel, at the current sampling time, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the green channel. The brightness ratios of the red channel and the brightness ratios of the green channel are combined in sequence to form a two-dimensional chromaticity vector, which is used as the two-dimensional chromaticity vector of the pixel at the current sampling time.
[0011] Optionally, the step of calculating the average chromaticity change intensity on the effective pixel set based on the two-dimensional chromaticity vector difference of pixels within the effective pixel set at adjacent sampling times specifically includes: At the next sampling time after alignment, for each pixel in the effective pixel set, the normalized gray values of the brightness in the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the total brightness of the pixel is compared with the value 1. When the total brightness is not lower than 1, the total brightness is used as the corrected total brightness of the pixel at the next sampling time after alignment. When the total brightness is lower than 1, 1 is used as the corrected total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the green channel. The two are combined into a two-dimensional chromaticity vector of the pixel at the next sampling time after alignment. For each valid pixel, subtract the corresponding component of the two-dimensional chromaticity vector at the current sampling time from the two-dimensional chromaticity vector at the next sampling time after alignment to obtain the two-dimensional chromaticity change vector of the pixel between the two sampling times; For each valid pixel, the two components of the two-dimensional chromaticity change vector are squared and added together. The square root of the sum is then taken to obtain the chromaticity change amplitude of the pixel, which is used as the Euclidean distance of the chromaticity change between the two sampling times. At the current sampling time, the chromaticity change amplitude of all pixels in the effective pixel set is accumulated and divided by the number of pixels in the effective pixel set to obtain the average chromaticity change intensity on the effective pixel set at the current sampling time.
[0012] Optionally, the step of averaging the two-dimensional chromaticity change vectors of pixels within the effective pixel set to obtain an average chromaticity change vector and then obtaining a unit principal direction vector specifically includes: At any sampling time, for the two-dimensional chromaticity change vector of each pixel in the set of effective pixels, the chromaticity change vector is accumulated in each component direction of the two-dimensional chromaticity change vector. The chromaticity change components of each pixel in the first component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the first component direction at the current sampling time. The chromaticity change components of each pixel in the second component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the second component direction at the current sampling time. The two average chromaticity change values are combined to form the average chromaticity change vector at the current sampling time. For the average chromaticity change vector at the current sampling time, square the first component and the second component respectively, add them together, and then take the square root of the sum to obtain the Euclidean norm of the average chromaticity change vector; When the Euclidean norm of the average chromaticity change vector is greater than zero, the first component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the first component. The second component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the second component. The two components are combined to form the unit principal direction vector at the current sampling time. When the Euclidean norm of the average chromaticity change vector is equal to zero, the first component of the unit principal direction vector is set to one, and the second component of the unit principal direction vector is set to zero to form the unit principal direction vector at the current sampling time.
[0013] Optionally, the step of projecting the two-dimensional chromaticity change vectors of each pixel within the effective pixel set onto a unit principal direction vector, averaging the projection scalars of each pixel to form a time series of principal direction projection desaturation, specifically includes: At any sampling time, for each pixel in the effective pixel set, the two components of the two-dimensional chromaticity change vector on the unit principal direction vector at the current sampling time are multiplied by the corresponding components of the unit principal direction vector and added to obtain the principal direction projection scalar of the pixel at the current sampling time, which is used as the effective decolorization component of the pixel at the current sampling time. At the current sampling time, the effective desaturation components of all pixels in the effective pixel set are accumulated and divided by the number of pixels in the effective pixel set to obtain the principal direction projection desaturation amount on the effective pixel set at the current sampling time, forming a time series of the principal direction projection desaturation amount changing with the sampling time.
[0014] Optionally, the step of discretely accumulating the decolorization amount over the time series projected in the main direction, calculating the decolorization change and the decolorization change stability index, constructing a decolorization change stability threshold based on the reference sampling time set, and determining that the fish peptone decolorization process has reached a stable final state when the decolorization change stability index of consecutive sampling times does not exceed the decolorization change stability threshold, specifically includes: Set the total cumulative decolorization amount of the principal direction projection at the initial sampling time to zero; At each sampling time, perform the following steps: Calculate the time difference between the current sampling time and the initial sampling time, divide it by the sampling period, and obtain the number of sampling steps from the initial sampling time to the current sampling time. When the number of sampling steps is not less than one, the principal direction projection decolorization amount of all sampling times from the first sampling time after the initial sampling time to the current sampling time is discretely accumulated in chronological order to obtain the total cumulative principal direction projection decolorization amount at the current sampling time. When the number of sampling steps is not less than one, the total amount of decolorization of the cumulative main direction projection at the current sampling time is subtracted from the total amount of decolorization of the cumulative main direction projection at the previous sampling time to obtain the amount of decolorization change at the current sampling time. When the number of sampling steps is not less than two, the amount of decolorization change at the current sampling time is subtracted from the amount of decolorization change at the previous sampling time, and the absolute value of the difference is taken to obtain the decolorization change stability index at the current sampling time. The first, second, and third sampling times after the initial sampling time are selected as the reference sampling time set. The absolute value of the decolorization change corresponding to each reference sampling time is taken, and the decolorization change with the largest absolute value is selected to obtain the maximum decolorization change within the reference sampling time set. Multiply the maximum decolorization change within the reference sampling time set by one percent to obtain the decolorization change stability threshold, and set the number of consecutive sampling times for stability determination to three. At any sampling time, if the number of sampling steps at the current sampling time is not less than two, obtain the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times. If the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times does not exceed the decolorization change stability threshold, it is determined that the fish peptone decolorization process has reached a stable final state at the current sampling time.
[0015] A system for implementing the computer vision-based monitoring method for fish peptone decolorization process includes: The image acquisition module has a monocular industrial camera fixedly installed above the continuous rotary drum reactor. The number of pixels in the horizontal and vertical directions of the camera imaging plane is set, the sampling period is set, and a two-dimensional pixel coordinate system of the fish peptone liquid surface projection area is established. At each sampling time, three-channel color images of the fish peptone liquid surface projection area are acquired and pixel brightness consistency calibration is performed. The brightness normalized image sequence is output. The colorimetric analysis module constructs a two-dimensional colorimetric vector for each pixel in the fish peptone liquid surface projection area and calculates the average colorimetric change intensity at each sampling time. It averages and normalizes the two-dimensional colorimetric change vectors within the effective pixel set and extracts the unit principal direction vector at each sampling time. It averages the projections of the two-dimensional colorimetric change vectors onto the unit principal direction vector to form a time series of principal direction projection decolorization. The trend determination module determines whether the fish peptone decolorization process has reached a stable final state.
[0016] The present invention has the following beneficial effects: This approach incorporates three-channel (RGB) images of the fish peptone surface region into an online monitoring framework. A corrected average total brightness function is introduced to address unstable lighting and camera parameter drift, normalizing the overall brightness of pixels in the surface region at each sampling time. This scheme adaptively corrects the three-channel grayscale values by calculating the ratio of the initial reference brightness to the current brightness in real time, ensuring the reliability and repeatability of subsequent colorimetric analysis. It requires no additional light source synchronization, exhibits strong resistance to lighting fluctuations, and maintains colorimetric extraction accuracy under a wide range of imaging conditions.
[0017] The liquid surface perturbation is simplified into a two-dimensional integer global translation, and a global search is performed within a preset ±3 pixel range to calculate the sum of squared brightness differences across frames to select the optimal displacement. This scheme directly calculates the global brightness residual on the set of liquid surface pixels, which avoids the positioning instability caused by the scarcity of features in low-texture areas and greatly reduces computational complexity. Only pixels within the liquid surface area before and after the displacement are included in the calculation, improving alignment accuracy; there is no parameter redundancy, and cross-frame alignment is completed quickly, ensuring pixel-level consistency in the subsequent chroma vector construction.
[0018] After obtaining the optimal perturbation displacement, compensation for the brightness-normalized image of the next frame is completed by integer coordinate translation, forming aligned reference image pairs between corresponding pixels. This process differs from traditional optical flow or interpolation resampling: it uses simple integer pixel shifting to avoid errors introduced by subpixel interpolation, while ensuring a one-to-one correspondence between pixel grayscale values before and after alignment, thus guaranteeing the accuracy of chromaticity difference analysis. Even under high temperature and high humidity environments, and with frequent device vibration and liquid surface fluctuations, the pixel alignment remains robust, providing a stable foundation for dynamic process monitoring.
[0019] By accumulating the three-channel normalized brightness values of each liquid surface pixel in the aligned image, the total brightness is first calculated and then cropped to the minimum value. Finally, the brightness ratios of the red and green channels are calculated and combined into a two-dimensional chromaticity vector. This method vividly reflects changes in red and green signals, reducing dimensionality while preserving decolorization characteristics. By compressing the chromaticity components from three channels into a ratio vector, redundant components in the blue channel are removed. This improves data processing efficiency and visualization interpretability, making changes in decolorization more intuitive. Compared to traditional offline measurements of turbidity or absorbance, this method achieves online, contactless color concentration monitoring.
[0020] To address the differences in chromaticity vectors between adjacent frames, this scheme calculates the Euclidean distance as the pixel-level chromaticity change amplitude and averages it across the effective pixel set to obtain the average chromaticity change intensity for a single frame. This average value calculation more comprehensively reflects the overall change trend of the entire liquid surface area, avoiding interference from local noise in the judgment. Smoothing out noise enhances monitoring stability; simultaneously, it exhibits higher sensitivity to sudden fluctuations during the production process, helping to promptly detect discoloration anomalies.
[0021] The average chromaticity change vector of all pixels is obtained by summing and averaging the two-dimensional chromaticity change vectors in both channel directions, and then normalizing it to obtain the unit principal direction vector. This scheme can extract the main change direction through simple vector summation and normalization, reducing computational overhead. The mean value is directly used instead of covariance matrix decomposition to achieve the same principal direction pointing effect. The algorithm is lightweight, has strong real-time performance, and can be embedded in resource-constrained industrial vision systems, while accurately revealing the most significant chromaticity change direction during the decolorization process.
[0022] Based on the unit principal direction vector, the chromaticity change vector of each pixel is projected onto the principal direction and averaged to form a principal direction projected decolorization time series. This captures the cumulative trend of overall chromaticity change in the most sensitive direction, making the decolorization curve more physically meaningful. It reflects the decolorization process with high contrast, facilitating subsequent stability analysis; compared with threshold-based single-point measurements, it can adaptively track the decolorization rate under varying operating conditions, reducing false alarms and false negatives.
[0023] For the time series of decolorization amount projected in the main direction, this scheme first discretizes and accumulates the cumulative decolorization amount, then calculates the change and the absolute value of the difference between adjacent time points as a stability index. An adaptive stability threshold is constructed by combining the maximum change values of the initial few frames, and the process is considered to have entered a stable final state only when the index is below this threshold for multiple consecutive frames. This scheme introduces a reference sampling set and a percentage threshold, making the judgment more flexible and reliable. The stability threshold is dynamically generated using the magnitude of previous fluctuations, reducing the risk of misjudging the termination due to noise or short-term fluctuations, and ensuring the accuracy and stability of the online monitoring results. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the process of the present invention.
[0025] Figure 2 This is a schematic diagram of the two-dimensional pixel coordinate system structure of the present invention.
[0026] In the diagram: 1-origin, 2-U-axis, 3-V-axis, 4-camera imaging plane. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] Example, refer to Figure 1 A method for monitoring the fish peptone decolorization process using computer vision, comprising: Three-channel images of the fish peptone liquid surface above the reactor were acquired. Consistency calibration was performed on the brightness of the liquid surface pixels at each sampling time to generate a brightness-normalized image sequence. Between adjacent sampling times, the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set were obtained through global translation modeling and displacement search. Based on the overall perturbation displacement vector of the fish peptone liquid surface, displacement compensation was performed on the brightness-normalized image of the next sampling time, constructing a reference image pair for adjacent sampling times within the effective pixel set. A two-dimensional chromaticity vector of the liquid surface pixels was constructed from the reference image pair. Based on the difference in the two-dimensional chromaticity vectors of pixels within the effective pixel set at adjacent sampling times, the chromaticity vectors of the effective pixel set were calculated. The average chromaticity change intensity is calculated by averaging the two-dimensional chromaticity change vectors of the pixels within the effective pixel set to obtain the average chromaticity change vector and the unit principal direction vector. The two-dimensional chromaticity change vectors of each pixel within the effective pixel set are projected onto the unit principal direction vector, and the projection scalars of each pixel are averaged to form a principal direction projection decolorization time series. The decolorization change amount and decolorization change stability index are discretely accumulated on the principal direction projection decolorization time series. A decolorization change stability threshold is constructed based on the reference sampling time set. When the decolorization change stability index of consecutive sampling times does not exceed the decolorization change stability threshold, the fish peptone decolorization process is determined to have reached a stable final state.
[0029] By continuously acquiring three-channel color images of the fish peptone liquid surface above the reactor and performing overall consistency calibration on the brightness of the liquid surface pixels at each sampling time, a standardized brightness normalized image sequence is generated, avoiding the influence of illumination fluctuations on the image analysis results. Then, using a global overall translation model and a preset displacement search strategy, the liquid surface disturbance displacement is estimated synchronously between two adjacent frames, and only effective pixels that are still in the liquid surface area before and after the displacement are processed, which ensures alignment accuracy and reduces computational load. On this basis, a two-dimensional chromaticity vector is constructed from the aligned image pairs, the average intensity of pixel chromaticity differences is calculated, and the main direction of change and its projected decolorization amount sequence are further extracted. Finally, by combining discrete accumulation and adaptive stability threshold judgment, online and continuous stability monitoring of the decolorization process is realized.
[0030] Reference Figure 2 The process involves acquiring three-channel images of the fish peptone liquid surface above the reactor, performing consistency calibration on the pixel brightness of the liquid surface at each sampling time, and generating a brightness-normalized image sequence, specifically including: A monocular industrial camera is fixedly installed above the continuous rotary drum reactor. The number of pixels in the horizontal and vertical directions of the camera imaging plane is set, the sampling period is set, and a two-dimensional pixel coordinate system is established on the camera imaging plane with the upper left corner of the fish peptone liquid surface projection area as the origin. The horizontal pixel index is increased sequentially from zero to the right, and the vertical pixel index is increased sequentially from zero to the bottom. At each sampling time, a color image containing the red, green and blue channels is acquired. For each pixel in the fish peptone liquid surface projection area, the grayscale value in the red, green and blue channels at the current sampling time is recorded, and all pixel positions belonging to the fish peptone liquid surface projection area are combined into a liquid surface pixel set. At each sampling time, for all pixels in the liquid surface pixel set, the gray values of each pixel in the red, green and blue channels are accumulated in the liquid surface pixel set to obtain the total brightness of the fish peptone liquid surface projection area and the number of pixels in the liquid surface pixel set at the current sampling time. The total brightness is divided by the number of pixels to obtain the average total brightness of the fish peptone liquid surface projection area at the current sampling time. At the initial sampling time when the system starts monitoring, the average total brightness of the fish peptone liquid surface projection area at the initial sampling time is used as the baseline average total brightness. At each subsequent sampling time, the average total brightness at the current sampling time is compared with the value 1. When the average total brightness is not lower than 1, the current average total brightness is used as the corrected average total brightness at the current sampling time. When the average total brightness is lower than 1, 1 is used as the corrected average total brightness at the current sampling time. At each sampling time, for each pixel in the liquid surface pixel set, the grayscale values on the red, green, and blue channels are multiplied by the ratio of the baseline average total brightness to the corrected average total brightness at the current sampling time, respectively, to obtain the brightness normalized grayscale values on the red, green, and blue channels.
[0031] A monocular industrial camera is fixedly installed above the continuous rotary drum reactor, with an imaging resolution of [missing information]. Pixels, imaging period is seconds; among which, , These represent the number of pixels in the horizontal and vertical directions of the camera's imaging plane, respectively. Establish a two-dimensional pixel coordinate system on the camera's imaging plane. The origin is The upper left corner of the area corresponding to the fish peptone liquid surface projection. The axis is positive when it points to the right in the horizontal direction. The axis is positive when it points downwards in the vertical direction, and its value range is as follows: , ;in, , These are the pixel indices for the horizontal and vertical directions, respectively. At any sampling time Acquire a frame of a three-channel color image, and represent the grayscale values of the three channels of each pixel as follows: , , ;in, It is a time variable; , , At time respectively Pixel coordinates are The grayscale values of the red, green, and blue channels at that location; Set the pixel set containing the fish peptone liquid surface as follows: ;in, In pixel coordinate system The pixel set corresponding to the fish peptone liquid surface region; Calculate at time Average total brightness of the fish peptone liquid surface area in the image Specifically: ;in, For set The number of pixels, i.e., the number of pixels contained in the surface area of the fish peptone liquid; Set at the initial time Average total brightness for: ;in, This is the initial data collection time when the system begins monitoring; The modified measurement function for any given time is constructed as follows: ;in, For at any time Corrected average total brightness; Then, brightness normalization is performed on each pixel channel to obtain: , ;in, For at any time Pixels Color channels The normalized grayscale value of the brightness; For color channel indexes; For at any time Pixels Color channels The original grayscale value.
[0032] The process of obtaining the overall disturbance displacement vector and effective pixel set of the fish peptone liquid surface between adjacent sampling times through overall translation modeling and displacement search specifically includes: Between two adjacent sampling times, the perturbation of the fish peptone liquid surface in the image plane is modeled as an overall integer displacement in the horizontal and vertical directions. Candidate displacement values are set in the integer range of negative three to positive three in the horizontal and vertical directions respectively. Any candidate displacement in the horizontal direction is combined with any candidate displacement in the vertical direction to form a set of overall displacement candidate combinations. For each overall displacement candidate combination, within the liquid surface pixel set, for each pixel position, determine whether the new pixel position corresponding to the pixel position after applying the overall displacement candidate combination still belongs to the liquid surface pixel set. Pixel positions that belong to the liquid surface pixel set before and after the displacement are combined into the effective pixel set of the corresponding overall displacement candidate combination, and count the number of pixels in the effective pixel set. For each group of valid pixel sets with a number of pixels greater than zero, in the brightness normalized images at the current sampling time and the next sampling time, for each pixel position in the valid pixel set, calculate the difference between the brightness normalized gray value at the current sampling time and the corresponding pixel brightness normalized gray value after translation by the overall displacement candidate combination at the next sampling time in the red, green and blue channels respectively. Square the differences of the three channels respectively and add them together to obtain the sum of squares of brightness difference of the pixel under the corresponding overall displacement candidate combination. Then, accumulate the sum of squares of brightness difference within the valid pixel set to obtain the cross-frame brightness difference sum of square error value of the corresponding overall displacement candidate combination. Among all candidate displacement combinations with a number of pixels greater than zero in the set of all valid pixels, compare the sum of squared errors of the cross-frame brightness difference corresponding to each candidate displacement combination, select the candidate displacement combination with the smallest sum of squared errors of the cross-frame brightness difference, take the candidate integer displacement in the horizontal direction of the candidate displacement combination corresponding to the smallest error as the horizontal component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, take the candidate integer displacement in the vertical direction of the candidate displacement combination corresponding to the smallest error as the vertical component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, and take the set of valid pixels corresponding to the smallest error as the set of valid pixels at the current sampling time. When the number of pixels in the effective pixel set corresponding to all candidate combinations of overall displacement is equal to zero, the horizontal component of the overall disturbance displacement vector of the fish peptone liquid surface at the current sampling time is set to zero, the vertical component is set to zero, and the liquid surface pixel set is taken as the effective pixel set at the current sampling time.
[0033] At two adjacent sampling times and Between these points, the perturbation of the fish peptone liquid surface on the image plane is modeled as a global translation, specifically as follows: ;in, From time arrive The overall displacement of the peptone liquid level in the fish on the image plane; , At time respectively and Integer displacements of the liquid surface in the horizontal and vertical directions; For a given candidate displacement The effective pixel set is constructed as follows: ;in, , These represent the horizontal and vertical displacements of the candidates, respectively. To be in a given candidate displacement Below, the pixel displacement occurs both before and after landing on the liquid surface area. The set of valid pixels within; For each set of candidate displacements The cross-frame luminance squared error function is constructed as follows: ;in, In candidate displacement Below, the sum of squared brightness differences between two adjacent normalized images on the effective set; Searching a finite set of integers , Inside, for all that satisfy Candidate displacement calculation If there exists at least one set of candidate displacements that satisfy Then select the one that makes The smallest set of displacements is used as the estimate of the liquid surface disturbance displacement vector: ; in, For set The number of pixels in the middle; , At time respectively Based on error function The optimal horizontal and vertical displacement estimates were obtained. If for all candidate displacements, we have Then set: , , .
[0034] The step of performing displacement compensation on the brightness-normalized image at the next sampling time based on the overall perturbation displacement vector of the fish peptone liquid surface, and constructing reference image pairs for adjacent sampling times within the effective pixel set, specifically includes: Between any current sampling time and the next sampling time, obtain the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set corresponding to the current sampling time. In the brightness normalized image of the next sampling time, for each pixel position belonging to the effective pixel set, according to the horizontal and vertical components of the overall perturbation displacement vector, perform an integer translation on the coordinates of the pixel position. Assign the brightness normalized gray value at the translated position to the pixel position in the effective pixel set of the current sampling time to form an aligned brightness normalized image. For each pixel location belonging to the valid pixel set, obtain the normalized grayscale value of the pixel corresponding to the pixel location in the red, green, and blue channels in the normalized image at the current sampling time. Obtain the normalized grayscale value of the same pixel location in the red, green, and blue channels in the aligned normalized image. Combine the normalized grayscale values of the same pixel location and the same color channel at the two sampling times into a reference image pair.
[0035] Using the obtained displacement vector, the time... The normalized image is compensated to construct the aligned image as follows: , , ;in, In order to at time After performing overall displacement compensation on the image, at the pixel level Color channels Normalized grayscale value; For any pixel The normalized reference image pair is formed as follows: , .
[0036] The construction of the two-dimensional chromaticity vector of the liquid surface pixels from the reference image pair specifically includes: At any sampling time, for each pixel in the liquid surface pixel set, the normalized gray values of the brightness in the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the current sampling time; For each pixel, at the current sampling time, the total brightness of the pixel is compared with the value 1. When the total brightness is not less than 1, the total brightness is used as the corrected total brightness of the pixel at the current sampling time. When the total brightness is less than 1, 1 is used as the corrected total brightness of the pixel at the current sampling time. For each pixel, at the current sampling time, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the green channel. The brightness ratios of the red channel and the brightness ratios of the green channel are combined in sequence to form a two-dimensional chromaticity vector, which is used as the two-dimensional chromaticity vector of the pixel at the current sampling time.
[0037] For each pixel and time The total brightness of the normalized image is calculated as follows: ;in, For at any time Pixels The sum of the normalized brightness of the three channels; The modified total brightness function is constructed as follows: ;in, For at any time Pixels Corrected total brightness; use Construct a two-dimensional chromaticity vector as follows: ;in, It is a two-dimensional column vector function, representing the time step (i). Pixels The chromaticity vector is composed of the proportions of the red and green channels; , At time respectively Pixels Normalized brightness percentages for the upper red and green channels.
[0038] The calculation of the average chromaticity change intensity on the effective pixel set based on the two-dimensional chromaticity vector difference of pixels within the effective pixel set at adjacent sampling times specifically includes: At the next sampling time after alignment, for each pixel in the effective pixel set, the normalized gray values of the brightness in the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the total brightness of the pixel is compared with the value 1. When the total brightness is not lower than 1, the total brightness is used as the corrected total brightness of the pixel at the next sampling time after alignment. When the total brightness is lower than 1, 1 is used as the corrected total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the green channel. The two are combined into a two-dimensional chromaticity vector of the pixel at the next sampling time after alignment. For each valid pixel, subtract the corresponding component of the two-dimensional chromaticity vector at the current sampling time from the two-dimensional chromaticity vector at the next sampling time after alignment to obtain the two-dimensional chromaticity change vector of the pixel between the two sampling times; For each valid pixel, the two components of the two-dimensional chromaticity change vector are squared and added together. The square root of the sum is then taken to obtain the chromaticity change amplitude of the pixel, which is used as the Euclidean distance of the chromaticity change between the two sampling times. At the current sampling time, the chromaticity change amplitude of all pixels in the effective pixel set is accumulated and divided by the number of pixels in the effective pixel set to obtain the average chromaticity change intensity on the effective pixel set at the current sampling time.
[0039] For each pixel Steps S501 to S505 are executed respectively, specifically as follows: S501, Calculate the time after alignment. Pixels The total brightness is: ; S502, The corrected total brightness is: ;in, For the time after alignment Pixels Corrected total brightness; S503. Utilization The two-dimensional chromaticity vector at the aligned time step is constructed as follows: ; in, For the time after alignment Pixels chromaticity vector; S504. The chromaticity change vector between adjacent frames is calculated as follows: ; in, For at any time and the time after alignment Between, pixels chromaticity variation vector; , These represent the changes in chroma for the corresponding red channel and green channel, respectively. S505, Calculate the chromaticity change amplitude as follows: ;in, For at any time and the time after alignment Between, pixels The Euclidean norm of chromaticity variation; For time Averaging the intensity of color change across the entire region yields: ;in, For at any time The average chromaticity change intensity within the upper and aligned effective areas.
[0040] The step of averaging the two-dimensional chromaticity change vectors of pixels within the effective pixel set to obtain the average chromaticity change vector and then obtaining the unit principal direction vector specifically includes: At any sampling time, for the two-dimensional chromaticity change vector of each pixel in the set of effective pixels, the chromaticity change vector is accumulated in each component direction. The chromaticity change components of each pixel in the first component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the first component direction at the current sampling time. The chromaticity change components of each pixel in the second component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the second component direction at the current sampling time. The two average chromaticity change values are combined to form the average chromaticity change vector at the current sampling time. For the average chromaticity change vector at the current sampling time, the first component and the second component are squared and added together. The square root of the sum is then taken to obtain the Euclidean norm of the average chromaticity change vector. When the Euclidean norm of the average chromaticity change vector is greater than zero, the first component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the first component. The second component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the second component. The two components are combined to form the unit principal direction vector at the current sampling time. When the Euclidean norm of the average chromaticity change vector is equal to zero, the first component of the unit principal direction vector is set to one, and the second component of the unit principal direction vector is set to zero to form the unit principal direction vector at the current sampling time.
[0041] For time Averaging the full-area chromaticity variation vector yields: ;in, For at any time Above, the average value of the chromaticity variation vectors within the set of effective pixels is aligned; calculate The Euclidean norm is: ;in, , are vectors The first component corresponds to the average change in the direction of chromaticity variation in the red channel; For vectors The second component corresponds to the average change in the direction of chromaticity variation in the green channel. For vectors The second norm; according to The values of the construct unit principal direction vector are: ;in, For at any time The unit principal direction vector.
[0042] The step of projecting the two-dimensional chromaticity change vectors of each pixel within the effective pixel set onto a unit principal direction vector, averaging the projection scalars of each pixel to form a time series of principal direction projection desaturation, specifically includes: At any sampling time, for each pixel in the effective pixel set, the two components of the two-dimensional chromaticity change vector on the unit principal direction vector at the current sampling time are multiplied by the corresponding components of the unit principal direction vector and added to obtain the principal direction projection scalar of the pixel at the current sampling time, which is used as the effective decolorization component of the pixel at the current sampling time. At the current sampling time, the effective desaturation components of all pixels in the effective pixel set are accumulated and divided by the number of pixels in the effective pixel set to obtain the principal direction projection desaturation amount on the effective pixel set at the current sampling time, forming a time series of the principal direction projection desaturation amount changing with the sampling time.
[0043] For each pixel The effective decolorization component in the principal direction is calculated as follows: ;in, For at any time Pixels The chromaticity change vector in the principal direction Projected scalar on; For time The average effective decolorization amount is obtained by averaging the effective decolorization amount across the entire region: ;in, For at any time The average value of the desaturated component projected onto the principal direction of the aligned effective pixel set.
[0044] The process involves discretely accumulating the decolorization amount over a time series projected along the main direction to calculate the decolorization change and its stability index. A stability threshold for decolorization change is constructed based on a set of reference sampling times. When the stability index for decolorization change at consecutive sampling times does not exceed this threshold, the fish peptone decolorization process is considered to have reached a stable final state. Specifically, this includes: Set the total cumulative decolorization amount of the principal direction projection at the initial sampling time to zero; At each sampling time, perform the following steps: Calculate the time difference between the current sampling time and the initial sampling time, divide it by the sampling period, and obtain the number of sampling steps from the initial sampling time to the current sampling time. When the number of sampling steps is not less than one, the principal direction projection decolorization amount of all sampling times from the first sampling time after the initial sampling time to the current sampling time is discretely accumulated in chronological order to obtain the total cumulative principal direction projection decolorization amount at the current sampling time. When the number of sampling steps is not less than one, the total amount of decolorization of the cumulative main direction projection at the current sampling time is subtracted from the total amount of decolorization of the cumulative main direction projection at the previous sampling time to obtain the amount of decolorization change at the current sampling time. When the number of sampling steps is not less than two, the amount of decolorization change at the current sampling time is subtracted from the amount of decolorization change at the previous sampling time, and the absolute value of the difference is taken to obtain the decolorization change stability index at the current sampling time. The first, second, and third sampling times after the initial sampling time are selected as the reference sampling time set. The absolute value of the decolorization change corresponding to each reference sampling time is taken, and the decolorization change with the largest absolute value is selected to obtain the maximum decolorization change within the reference sampling time set. Multiply the maximum decolorization change within the reference sampling time set by one percent to obtain the decolorization change stability threshold, and set the number of consecutive sampling times for stability determination to three. At any sampling time, if the number of sampling steps at the current sampling time is not less than two, obtain the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times. If the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times does not exceed the decolorization change stability threshold, it is determined that the fish peptone decolorization process has reached a stable final state at the current sampling time.
[0045] Calculate from the initial time At the time The number of sampling steps between them is ; Set at the initial time The total effective decolorization amount is ; For satisfying The moment The execution steps S801 and S802 are as follows: S801, Calculate from the initial time At the time Average effective decolorization amount at all sampling times between The discrete summation is ;in, The summation index corresponding to the discrete time step; S802, Calculate at time... The amount of decolorization change is ; For satisfying The moment Calculate at time The stability index of decolorization change is ; Selecting a set of reference times Calculate the maximum absolute value of the decolorization change on this set: ;in, For elements in the reference time set; Within the reference time set The maximum value; construct the decolorization change stability threshold as ; Take the number of consecutive sampling times used for stability determination ; For satisfying At a certain moment When the set Every moment in satisfy At that time, it was determined that the fish peptone decolorization process had reached a stable final state.
[0046] This embodiment also provides a system for monitoring the fish peptone decolorization process using computer vision, including: The image acquisition module has a monocular industrial camera fixedly installed above the continuous rotary drum reactor. It sets the number of pixels on the camera's imaging plane in both the horizontal and vertical directions, sets the sampling period, and establishes a two-dimensional pixel coordinate system for the fish peptone liquid surface projection area. At each sampling time, it acquires three-channel color images of the fish peptone liquid surface projection area and performs pixel brightness consistency calibration, outputting a brightness-normalized image sequence. The colorimetric analysis module constructs two-dimensional colorimetric vectors for each pixel in the fish peptone liquid surface projection area and calculates the average colorimetric change intensity at each sampling time. It averages and normalizes the two-dimensional colorimetric change vectors within the effective pixel set, extracting the unit principal direction vector at each sampling time. It averages the projections of the two-dimensional colorimetric change vectors onto the unit principal direction vector to form a time series of decolorization amount by principal direction projection. The trend determination module determines whether the fish peptone decolorization process has reached a stable final state.
[0047] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0048] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for monitoring the fish peptone decolorization process using computer vision, characterized in that, include: Three-channel images of the fish peptone liquid surface above the reactor were acquired, and consistency calibration was performed on the pixel brightness of the liquid surface at each sampling time to generate a brightness-normalized image sequence. Between adjacent sampling times, the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set are obtained through overall translation modeling and displacement search; Based on the overall perturbation displacement vector of the fish peptone liquid surface, displacement compensation is performed on the brightness normalized image at the next sampling time, and reference image pairs of adjacent sampling times are constructed within the effective pixel set; Construct a two-dimensional chromaticity vector for the liquid surface pixels from the reference image pair; The average chromaticity change intensity on the effective pixel set is calculated based on the difference in two-dimensional chromaticity vectors of pixels within the effective pixel set at adjacent sampling times. The average chromaticity change vector of each pixel in the effective pixel set is obtained by averaging the two-dimensional chromaticity change vector and obtaining the unit principal direction vector. The two-dimensional chromaticity change vectors of each pixel in the effective pixel set are projected onto the unit principal direction vector, and the projection scalars of each pixel are averaged to form a time series of principal direction projection decolorization. Discretely accumulate the decolorization amount over the time series of the main direction projection, calculate the decolorization change amount and the decolorization change stability index, construct the decolorization change stability threshold based on the reference sampling time set, and determine that the fish peptone decolorization process has reached a stable final state when the decolorization change stability index of consecutive sampling times does not exceed the decolorization change stability threshold.
2. The method for monitoring the fish peptone decolorization process using computer vision according to claim 1, characterized in that, The three-channel image of the fish peptone liquid surface above the reactor is collected, and the pixel brightness of the liquid surface at each sampling time is calibrated for consistency to generate a brightness-normalized image sequence, specifically including: A monocular industrial camera is fixedly installed above the continuous rotary drum reactor. The number of pixels in the horizontal and vertical directions of the camera imaging plane is set, the sampling period is set, and a two-dimensional pixel coordinate system is established on the camera imaging plane with the upper left corner of the fish peptone liquid surface projection area as the origin. The horizontal pixel index is increased sequentially from zero to the right, and the vertical pixel index is increased sequentially from zero to the bottom. At each sampling time, a color image containing the red, green and blue channels is acquired. For each pixel in the fish peptone liquid surface projection area, the grayscale value in the red, green and blue channels at the current sampling time is recorded, and all pixel positions belonging to the fish peptone liquid surface projection area are combined into a liquid surface pixel set. At each sampling time, for all pixels in the liquid surface pixel set, the gray values of each pixel in the red, green and blue channels are accumulated in the liquid surface pixel set to obtain the total brightness of the fish peptone liquid surface projection area and the number of pixels in the liquid surface pixel set at the current sampling time. The total brightness is divided by the number of pixels to obtain the average total brightness of the fish peptone liquid surface projection area at the current sampling time. At the initial sampling time when the system starts monitoring, the average total brightness of the fish peptone liquid surface projection area at the initial sampling time is used as the baseline average total brightness. At each subsequent sampling time, the average total brightness at the current sampling time is compared with the value 1. When the average total brightness is not lower than 1, the current average total brightness is used as the corrected average total brightness at the current sampling time. When the average total brightness is lower than 1, 1 is used as the corrected average total brightness at the current sampling time. At each sampling time, for each pixel in the liquid surface pixel set, the grayscale values on the red, green, and blue channels are multiplied by the ratio of the baseline average total brightness to the corrected average total brightness at the current sampling time, respectively, to obtain the brightness normalized grayscale values on the red, green, and blue channels.
3. The method for monitoring the fish peptone decolorization process using computer vision according to claim 2, characterized in that, The process of obtaining the overall disturbance displacement vector and effective pixel set of the fish peptone liquid surface between adjacent sampling times through overall translation modeling and displacement search specifically includes: Between two adjacent sampling times, the perturbation of the fish peptone liquid surface in the image plane is modeled as an overall integer displacement in the horizontal and vertical directions. Candidate displacement values are set in the integer range of negative three to positive three in the horizontal and vertical directions respectively. Any candidate displacement in the horizontal direction is combined with any candidate displacement in the vertical direction to form a set of overall displacement candidate combinations. For each overall displacement candidate combination, within the liquid surface pixel set, for each pixel position, determine whether the new pixel position corresponding to the pixel position after applying the overall displacement candidate combination still belongs to the liquid surface pixel set. Pixel positions that belong to the liquid surface pixel set before and after the displacement are combined into the effective pixel set of the corresponding overall displacement candidate combination, and count the number of pixels in the effective pixel set. For each group of valid pixel sets with a number of pixels greater than zero, in the brightness normalized images at the current sampling time and the next sampling time, for each pixel position in the valid pixel set, calculate the difference between the brightness normalized gray value at the current sampling time and the corresponding pixel brightness normalized gray value after translation by the overall displacement candidate combination at the next sampling time in the red, green and blue channels respectively. Square the differences of the three channels respectively and add them together to obtain the sum of squares of brightness difference of the pixel under the corresponding overall displacement candidate combination. Then, accumulate the sum of squares of brightness difference within the valid pixel set to obtain the cross-frame brightness difference sum of square error value of the corresponding overall displacement candidate combination. Among all candidate displacement combinations with a number of pixels greater than zero in the set of all valid pixels, compare the sum of squared errors of the cross-frame brightness difference corresponding to each candidate displacement combination, select the candidate displacement combination with the smallest sum of squared errors of the cross-frame brightness difference, take the candidate integer displacement in the horizontal direction of the candidate displacement combination corresponding to the smallest error as the horizontal component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, take the candidate integer displacement in the vertical direction of the candidate displacement combination corresponding to the smallest error as the vertical component of the overall disturbance displacement vector of the peptone liquid surface at the current sampling time, and take the set of valid pixels corresponding to the smallest error as the set of valid pixels at the current sampling time. When the number of pixels in the effective pixel set corresponding to all candidate combinations of overall displacement is equal to zero, the horizontal component of the overall disturbance displacement vector of the fish peptone liquid surface at the current sampling time is set to zero, the vertical component is set to zero, and the liquid surface pixel set is taken as the effective pixel set at the current sampling time.
4. The method for monitoring the fish peptone decolorization process using computer vision according to claim 3, characterized in that, The step of performing displacement compensation on the brightness-normalized image at the next sampling time based on the overall perturbation displacement vector of the fish peptone liquid surface, and constructing reference image pairs for adjacent sampling times within the effective pixel set, specifically includes: Between any current sampling time and the next sampling time, obtain the overall perturbation displacement vector of the fish peptone liquid surface and the effective pixel set corresponding to the current sampling time. In the brightness normalized image of the next sampling time, for each pixel position belonging to the effective pixel set, according to the horizontal and vertical components of the overall perturbation displacement vector, perform an integer translation on the coordinates of the pixel position. Assign the brightness normalized gray value at the translated position to the pixel position in the effective pixel set of the current sampling time to form an aligned brightness normalized image. For each pixel location belonging to the valid pixel set, obtain the normalized grayscale value of the pixel corresponding to the pixel location in the red, green, and blue channels in the normalized image at the current sampling time. Obtain the normalized grayscale value of the same pixel location in the red, green, and blue channels in the aligned normalized image. Combine the normalized grayscale values of the same pixel location and the same color channel at the two sampling times into a reference image pair.
5. A method for monitoring the fish peptone decolorization process using computer vision according to claim 4, characterized in that, The construction of the two-dimensional chromaticity vector of the liquid surface pixels from the reference image pair specifically includes: At any sampling time, for each pixel in the liquid surface pixel set, the normalized grayscale values of the brightness on the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the current sampling time; For each pixel, at the current sampling time, the total brightness of the pixel is compared with the value 1. When the total brightness is not less than 1, the total brightness is used as the corrected total brightness of the pixel at the current sampling time. When the total brightness is less than 1, 1 is used as the corrected total brightness of the pixel at the current sampling time. For each pixel, at the current sampling time, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the current sampling time to obtain the brightness ratio of the green channel. The brightness ratios of the red channel and the brightness ratios of the green channel are combined in sequence to form a two-dimensional chromaticity vector, which is used as the two-dimensional chromaticity vector of the pixel at the current sampling time.
6. A method for monitoring the fish peptone decolorization process using computer vision according to claim 5, characterized in that, The calculation of the average chromaticity change intensity on the effective pixel set based on the two-dimensional chromaticity vector difference of pixels within the effective pixel set at adjacent sampling times specifically includes: At the next sampling time after alignment, for each pixel in the effective pixel set, the normalized gray values of the brightness on the red, green and blue channels are accumulated to obtain the total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the total brightness of the pixel is compared with the value 1. When the total brightness is not lower than 1, the total brightness is used as the corrected total brightness of the pixel at the next sampling time after alignment. When the total brightness is lower than 1, 1 is used as the corrected total brightness of the pixel at the next sampling time after alignment. For each valid pixel, at the next sampling time after alignment, the normalized gray value of the brightness in the red channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the red channel. The normalized gray value of the brightness in the green channel is divided by the corrected total brightness of the pixel at the next sampling time after alignment to obtain the brightness ratio of the green channel. The two are combined into a two-dimensional chromaticity vector of the pixel at the next sampling time after alignment. For each valid pixel, subtract the corresponding component of the two-dimensional chromaticity vector at the current sampling time from the two-dimensional chromaticity vector at the next sampling time after alignment to obtain the two-dimensional chromaticity change vector of the pixel between the two sampling times; For each valid pixel, the two components of the two-dimensional chromaticity change vector are squared and added together. The square root of the sum is then taken to obtain the chromaticity change amplitude of the pixel, which is used as the Euclidean distance of the chromaticity change between the two sampling times. At the current sampling time, the chromaticity change amplitude of all pixels in the effective pixel set is accumulated and divided by the number of pixels in the effective pixel set to obtain the average chromaticity change intensity on the effective pixel set at the current sampling time.
7. A method for monitoring the fish peptone decolorization process using computer vision according to claim 6, characterized in that, The step of averaging the two-dimensional chromaticity change vectors of pixels within the effective pixel set to obtain the average chromaticity change vector and then obtaining the unit principal direction vector specifically includes: At any sampling time, for the two-dimensional chromaticity change vector of each pixel in the set of effective pixels, the chromaticity change vector is accumulated in each component direction of the two-dimensional chromaticity change vector. The chromaticity change components of each pixel in the first component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the first component direction at the current sampling time. The chromaticity change components of each pixel in the second component direction are accumulated and then divided by the number of effective pixels to obtain the average chromaticity change in the second component direction at the current sampling time. The two average chromaticity change values are combined to form the average chromaticity change vector at the current sampling time. For the average chromaticity change vector at the current sampling time, square the first component and the second component respectively, add them together, and then take the square root of the sum to obtain the Euclidean norm of the average chromaticity change vector; When the Euclidean norm of the average chromaticity change vector is greater than zero, the first component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the first component. The second component of the average chromaticity change vector is divided by the Euclidean norm to obtain the component of the unit principal direction vector in the direction of the second component. The two components are combined to form the unit principal direction vector at the current sampling time. When the Euclidean norm of the average chromaticity change vector is equal to zero, the first component of the unit principal direction vector is set to one, and the second component of the unit principal direction vector is set to zero to form the unit principal direction vector at the current sampling time.
8. A method for monitoring the fish peptone decolorization process using computer vision according to claim 7, characterized in that, The step of projecting the two-dimensional chromaticity change vectors of each pixel within the effective pixel set onto a unit principal direction vector, averaging the projection scalars of each pixel to form a time series of principal direction projection desaturation, specifically includes: At any sampling time, for each pixel in the effective pixel set, the two components of the two-dimensional chromaticity change vector on the unit principal direction vector at the current sampling time are multiplied by the corresponding components of the unit principal direction vector and added to obtain the principal direction projection scalar of the pixel at the current sampling time, which is used as the effective decolorization component of the pixel at the current sampling time. At the current sampling time, the effective desaturation components of all pixels in the effective pixel set are accumulated and divided by the number of pixels in the effective pixel set to obtain the principal direction projection desaturation amount on the effective pixel set at the current sampling time, forming a time series of the principal direction projection desaturation amount changing with the sampling time.
9. A method for monitoring the fish peptone decolorization process using computer vision according to claim 8, characterized in that, The process involves discretely accumulating the decolorization amount over a time series projected along the main direction to calculate the decolorization change and its stability index. A stability threshold for decolorization change is constructed based on a set of reference sampling times. When the stability index for decolorization change at consecutive sampling times does not exceed this threshold, the fish peptone decolorization process is considered to have reached a stable final state. Specifically, this includes: Set the total cumulative decolorization amount of the principal direction projection at the initial sampling time to zero; At each sampling time, perform the following steps: Calculate the time difference between the current sampling time and the initial sampling time, divide it by the sampling period, and obtain the number of sampling steps from the initial sampling time to the current sampling time. When the number of sampling steps is not less than one, the principal direction projection decolorization amount of all sampling times from the first sampling time after the initial sampling time to the current sampling time is discretely accumulated in chronological order to obtain the total cumulative principal direction projection decolorization amount at the current sampling time. When the number of sampling steps is not less than one, the total amount of decolorization of the cumulative main direction projection at the current sampling time is subtracted from the total amount of decolorization of the cumulative main direction projection at the previous sampling time to obtain the amount of decolorization change at the current sampling time. When the number of sampling steps is not less than two, the amount of decolorization change at the current sampling time is subtracted from the amount of decolorization change at the previous sampling time, and the absolute value of the difference is taken to obtain the decolorization change stability index at the current sampling time. The first, second, and third sampling times after the initial sampling time are selected as the reference sampling time set. The absolute value of the decolorization change corresponding to each reference sampling time is taken, and the decolorization change with the largest absolute value is selected to obtain the maximum decolorization change within the reference sampling time set. Multiply the maximum decolorization change within the reference sampling time set by one percent to obtain the decolorization change stability threshold, and set the number of consecutive sampling times for stability determination to three. At any sampling time, if the number of sampling steps at the current sampling time is not less than two, obtain the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times. If the decolorization change stability index corresponding to the current sampling time and the next two consecutive sampling times does not exceed the decolorization change stability threshold, it is determined that the fish peptone decolorization process has reached a stable final state at the current sampling time.
10. A system employing the computer vision-based fish peptone decolorization process monitoring method as described in claim 9, characterized in that, include: The image acquisition module has a monocular industrial camera fixedly installed above the continuous rotary drum reactor. The number of pixels in the horizontal and vertical directions of the camera imaging plane is set, the sampling period is set, and a two-dimensional pixel coordinate system of the fish peptone liquid surface projection area is established. At each sampling time, three-channel color images of the fish peptone liquid surface projection area are acquired and pixel brightness consistency calibration is performed. The brightness normalized image sequence is output. The colorimetric analysis module constructs a two-dimensional colorimetric vector for each pixel in the fish peptone liquid surface projection area and calculates the average colorimetric change intensity at each sampling time. The two-dimensional chromaticity variation vector within the effective pixel set is averaged and normalized to extract the unit principal direction vector at each sampling time. The projection of the two-dimensional chromaticity change vector onto the unit principal direction vector is averaged to form a time series of principal direction projection decolorization amount; The trend determination module determines whether the fish peptone decolorization process has reached a stable final state.