Pulse signal information generation method, device, electronic device and readable medium
Through the channel separation processing and matrix initialization of the image sequence, the pulse signal information of the image sequence is generated, and the detection effect of the detection effect caused by the existing technology in the existing technology in the existing technology in the existing technology, and achieves more efficient motion target detection.
Patent Information
- Application Number
- CN202410075859.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-01-18
AI Technical Summary
When encoding an image sequence in the prior art, the generated pulse signal information has a large amount of redundant information, resulting in poor detection effect on moving targets in the image sequence, long detection time and high equipment power consumption.
Through the channel separation of the image sequence, build the average value matrix and the variance value matrix, and initialize these matrix based on several consecutive frames of images, generate the coding information sequence of red channels, green channels and blue channels, and finally generate images to generate images The pulse signal information corresponding to the sequence.
Reduce the redundant information carried by the generated pulse signal information, increase the detection effect of motion targets in the image sequence, and have a short detection time and low equipment power consumption.
Smart Images

Figure CN118071616B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and readable medium for generating pulse signal information. Background Art
[0002] In the cross-technical field of brain-like computing and deep learning, the introduction of spiking neural networks not only provides an effective verification method for brain-like computing technology, but also reveals a low-power and high-performance deep learning network. The spiking neural network decomposes information carriers such as images, natural languages, and signals into a series of binary pulse signals in a serialized manner, and then uses this series of pulse signals as the input of the neural network to train and predict the network. In addition, due to the brain-like characteristics of the spiking neural network, the event-driven activation design can make the spiking neural network have a higher sensitivity to the dynamic changes of the information carrier. Therefore, the spiking neural network has a stronger response ability to dynamic objects or objects with a high degree of distinction from the surrounding environment in the video or image sequence. Therefore, in order to use the picture sequence or video as the input of the spiking neural network, it is necessary to encode it and generate it into a binary pulse signal. At present, when encoding an image sequence, the method usually adopted is: a general encoder (such as a Poisson encoder, a weighted encoder, etc.) is used to encode the single frame of the image sequence frame by frame and generate pulse signal information.
[0003] However, when the above method is used to encode the image sequence, the following technical problems often occur:
[0004] Single-frame images in an image sequence are encoded frame by frame, resulting in the generated pulse signal information having only the static information of a single-frame image. Since different adjacent images in the image sequence carry a lot of repeated information, the generated pulse signal information carries a lot of redundant information (the encoded pulse signal information repeats the encoding of the same part of the information between images), resulting in poor detection of moving targets in the image sequence, that is, the detection time is longer and the power consumption required for the detection equipment is higher.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a pulse signal information generation method, device, electronic device and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for generating pulse signal information, the method comprising: acquiring an image sequence; performing channel separation processing on the above image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; constructing an average value matrix and a variance value matrix, wherein the size of the above average value matrix is the same as the size of the image in the above image sequence, and the size of the above average value matrix is the same as the size of the above variance value matrix; determining each red channel image in the above red channel image sequence that meets the initialization condition of the average value matrix as an initialized red channel image set; initializing the above average value matrix according to the above initialized red channel image set to obtain an initial average value matrix; initializing the above variance value matrix according to the above initialized red channel image set to obtain an initial variance value matrix; determining a sequence composed of each red channel image in the above red channel image sequence that does not meet the initialization condition of the above average value matrix as a red channel image sequence to be encoded; for each red channel image to be encoded in the above red channel image sequence to be encoded, performing the following encoding steps: for each pixel in the above red channel image to be encoded point, generate red channel coding information according to the initial average value matrix, the initial variance value matrix and the pixel values corresponding to the pixel points; determine the red channel coding information sequence according to the generated red channel coding information; generate an updated average value matrix based on the red channel image to be encoded and the initial average value matrix; generate an updated variance value matrix based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix; determine the updated average value matrix as the initial average value matrix to update the initial average value matrix; determine the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix; determine the determined red channel coding information sequences as a red channel coding information sequence set; generate a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set.
[0009] In a second aspect, some embodiments of the present disclosure provide a pulse signal information generating device, the device comprising: an acquisition unit, configured to acquire an image sequence; a channel separation processing unit, configured to perform channel separation processing on the above image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; a construction unit, configured to construct an average value matrix and a variance value matrix, wherein the size of the above average value matrix is the same as the size of the image in the above image sequence, and the size of the above average value matrix is the same as the size of the above variance value matrix; a first determination unit, configured to convert each red channel image in the above red channel image sequence that meets the average value matrix initialization condition into a matrix; The image is determined as an initialized red channel image set; the first initialization processing unit is configured to initialize the above average value matrix according to the above initialized red channel image set to obtain an initial average value matrix; the second initialization processing unit is configured to initialize the above variance value matrix according to the above initialized red channel image set to obtain an initial variance value matrix; the second determination unit is configured to determine a sequence composed of each red channel image that does not meet the above average value matrix initialization condition in the above red channel image sequence as a red channel image sequence to be encoded; the execution unit is configured to, for each red channel image to be encoded in the above red channel image sequence to be encoded , perform the following encoding steps: for each pixel point in the above-mentioned red channel image to be encoded, generate red channel encoding information according to the above-mentioned initial average value matrix, the above-mentioned initial variance value matrix and the pixel value corresponding to the above-mentioned pixel point; determine the red channel encoding information sequence according to the generated red channel encoding information; based on the above-mentioned red channel image to be encoded and the above-mentioned initial average value matrix, generate an updated average value matrix; based on the above-mentioned red channel image to be encoded, the above-mentioned initial average value matrix, the above-mentioned updated average value matrix and the above-mentioned initial variance value matrix, generate an updated variance value matrix; determine the above-mentioned updated average value matrix as the initial average value matrix to update the initial average value matrix; The updated variance value matrix is determined as the initial variance value matrix to update the initial variance value matrix; the third determination unit is configured to determine the determined red channel coding information sequences as a red channel coding information sequence set; the first generation unit is configured to generate a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; the second generation unit is configured to generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the pulse signal information generation method of some embodiments of the present disclosure, the amount of redundant information carried by the generated pulse signal information can be reduced, and the detection effect of the moving target in the image sequence can be improved. Specifically, the redundant information carried by the generated pulse signal information is large (the encoded pulse signal information repeats the information encoding of the same part between the images), which leads to poor detection effect of the moving target in the image sequence, that is, the detection time is long, and the power consumption required by the detection device is high. The reason is that: the single-frame image of the image sequence is encoded frame by frame, resulting in the generated pulse signal information having only the static information of the single-frame image, and because the adjacent different images in the image sequence carry more repeated information, the redundant information carried by the generated pulse signal information is large (the encoded pulse signal information repeats the information encoding of the same part between the images), which leads to poor detection effect of the moving target in the image sequence, that is, the detection time is long, and the power consumption required by the detection device is high. Based on this, the pulse signal information generation method of some embodiments of the present disclosure, first, obtains the image sequence. Thus, an image sequence representing the original image information can be obtained. Then, the image sequence is subjected to channel separation processing to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence. Thus, a red channel image sequence, a green channel image sequence and a blue channel image sequence representing different channel information of the image sequence can be obtained. Afterwards, a mean value matrix and a variance value matrix are constructed. Among them, the size of the mean value matrix is the same as the size of the image in the image sequence. The size of the mean value matrix is the same as the size of the variance value matrix. Each red channel image in the red channel image sequence that meets the initialization condition of the mean value matrix is determined as an initialized red channel image set. According to the initialized red channel image set, the mean value matrix is initialized to obtain an initial mean value matrix. Thus, the mean value matrix with the same size as the image can be initialized based on the images of several consecutive frames in the image sequence to obtain an initial mean value matrix. Subsequently, according to the initialized red channel image set, the variance value matrix is initialized to obtain an initial variance value matrix. Thus, the variance value matrix with the same size as the image can be initialized based on the images of several consecutive frames in the image sequence to obtain an initial variance value matrix. Then, the sequence of red channel images in the red channel image sequence that do not meet the above average value matrix initialization condition is determined as the red channel image sequence to be encoded. Thus, the red channel image sequence to be encoded that needs to be encoded can be determined, so that it can be used to capture the dynamic information of the moving target in the image sequence.Then, for each red channel image to be encoded in the above-mentioned sequence of red channel images to be encoded, the following encoding steps are performed: for each pixel in the above-mentioned red channel image to be encoded, red channel encoding information is generated according to the above-mentioned initial average matrix, the above-mentioned initial variance value matrix and the pixel value corresponding to the above-mentioned pixel. Thus, the red channel encoding information can be obtained, thereby completing the encoding of a pixel in the red channel image. Then, according to the generated red channel encoding information, the red channel encoding information sequence is determined. Thus, the red channel encoding information sequence can be obtained, thereby completing the encoding of a single frame of red channel image. Secondly, based on the above-mentioned red channel image to be encoded and the above-mentioned initial average matrix, an updated average matrix is generated. Based on the above-mentioned red channel image to be encoded, the above-mentioned initial average matrix, the above-mentioned updated average matrix and the above-mentioned initial variance value matrix, an updated variance value matrix is generated. Thus, an updated average matrix and an updated variance value matrix can be obtained, which can be used to encode the next frame of image. Then, the above-mentioned updated average matrix is determined as the initial average matrix to update the initial average matrix. Thus, the updating of the initial average matrix can be completed. The updated variance value matrix is determined as the initial variance value matrix to update the initial variance value matrix. Thus, the initial variance value matrix can be updated. Afterwards, the determined red channel coding information sequences are determined as the red channel coding information sequence set. Thus, the red channel coding information sequence set can be obtained, thereby completing the coding of each red channel image corresponding to the image sequence. Subsequently, according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix, a green channel coding information sequence set and a blue channel coding information sequence set are generated. Thus, a green channel coding information sequence set and a blue channel coding information sequence set can be obtained, thereby completing the coding of each green channel image and each blue channel image corresponding to the image sequence. Finally, according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set, the pulse signal information corresponding to the image sequence is generated. Thus, the pulse signal information corresponding to the image sequence can be obtained, thereby completing the coding of the image sequence. Also, by constructing a mean value matrix and a variance value matrix of the same size as the images in the image sequence, and initializing the mean value matrix and the variance value matrix based on several consecutive frames of images, an initial mean value matrix and an initial variance value matrix with contextual dynamic information of the image sequence are obtained. Also, because the initial mean value matrix and the initial variance value matrix corresponding to each frame of the image to be encoded can be updated based on the inter-frame difference, the dynamic information of the moving target in the image sequence can be continuously captured.This can reduce the amount of redundant information carried by the generated pulse signal information (the encoded pulse signal information has fewer repetitions in the encoding of the same part of the information between images), and improve the detection effect of moving targets in image sequences, that is, the detection time is shorter and the power consumption required by the detection equipment is lower. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flow chart of some embodiments of the pulse signal information generating method according to the present disclosure;
[0015] Figure 2 is a schematic structural diagram of some embodiments of the pulse signal information generating device according to the present disclosure;
[0016] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] Figure 1 The process 100 of some embodiments of the pulse signal information generation method according to the present disclosure is shown. The pulse signal information generation method comprises the following steps:
[0024] Step 101: Acquire an image sequence.
[0025] In some embodiments, the execution subject (such as a computing device) of the pulse signal information generation method can obtain an image sequence through a wired connection or a wireless connection, and through an associated image sequence acquisition device. Among them, the above-mentioned associated image sequence acquisition device can be a device capable of performing image sequence acquisition. For example, the above-mentioned associated image sequence acquisition device can be an industrial camera. The above-mentioned image sequence can also be a video. The above-mentioned image sequence can be an image sequence acquired by the above-mentioned associated image sequence acquisition device. For example, the above-mentioned image sequence can be an image sequence of the surrounding driving environment taken by an industrial camera on any autonomous driving vehicle. It should be pointed out that the above-mentioned wireless connection method can include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0026] Step 102: performing channel separation processing on the image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence.
[0027] In some embodiments, the execution subject may perform channel separation processing on the image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence. In practice, the execution subject may perform channel separation processing on the image sequence using a preset channel separation function to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence. The preset channel separation function may be a preset channel separation function. For example, the preset channel separation function may be a Split separation function. The red channel image sequence may be an image sequence composed of red channel images of each image in the image sequence that has been subjected to channel separation processing. The green channel image sequence may be an image sequence composed of green channel images of each image in the image sequence that has been subjected to channel separation processing. The blue channel image sequence may be an image sequence composed of blue channel images of each image in the image sequence that has been subjected to channel separation processing. The images in the image sequence may include: red channel images, green channel images and blue channel images. That is, images of three RGB channels.
[0028] Step 103, constructing a mean value matrix and a variance value matrix.
[0029] In some embodiments, the above-mentioned execution subject can construct a mean value matrix and a variance value matrix. Among them, the size of the above-mentioned mean value matrix is the same as the size of the image in the above-mentioned image sequence. The size of the above-mentioned mean value matrix is the same as the size of the variance value matrix. The size of the matrix can be the number of rows and columns of the matrix. The size of the image can be the image length of the image (the number of pixels in the horizontal direction of the image) and the image width (the number of pixels in the vertical direction of the image). The size of the above-mentioned mean value matrix is the same as the size of the image in the above-mentioned image sequence. It can be understood that the number of rows of the mean value matrix is the same as the image width of the image in the image sequence, and the number of columns of the mean value matrix is the same as the image length of the image in the image sequence. In practice, the above-mentioned execution subject can use the image width of the image in the image sequence as the number of rows of the mean value matrix, the image length of the image as the number of columns of the mean value, and fill the elements with 0 to construct the mean value matrix. At the same time, the variance value matrix is constructed in the same way.
[0030] Step 104: determine each red channel image in the red channel image sequence that meets the average value matrix initialization condition as an initialized red channel image set.
[0031] In some embodiments, the above-mentioned execution subject may determine each red channel image in the above-mentioned red channel image sequence that meets the average value matrix initialization condition as the initialization red channel image set. Wherein, the above-mentioned average value matrix initialization condition may be that the sequence number corresponding to the red channel image in the red channel image sequence is less than or equal to a preset sequence number threshold. The above-mentioned preset sequence number threshold may be a pre-set sequence number threshold. For example, the above-mentioned preset sequence number threshold may be 5. Here, the sequence number may be the sequence number of the corresponding arrangement position of the red channel image sequence. For example, the sequence number of the red channel image of the first frame in the red channel image sequence may be 1. In practice, the above-mentioned execution subject may determine each red channel image in the above-mentioned red channel image sequence that meets the average value matrix initialization condition as the initialization red channel image set.
[0032] Step 105 , initializing the average value matrix according to the initialization red channel image set to obtain an initial average value matrix.
[0033] In some embodiments, based on the above-mentioned initialized red channel image set, the above-mentioned execution entity can initialize the above-mentioned average value matrix to obtain an initial average value matrix.
[0034] In some optional implementations of some embodiments, according to the above-mentioned initialized red channel image set, the above-mentioned execution subject may initialize the above-mentioned average value matrix through the following steps to obtain an initial average value matrix:
[0035] The first step is to sort the initialization red channel images included in the initialization red channel image set, and obtain the sorted initialization red channel image set as the initialization red channel image sequence. The pixel points of the initialization red channel images in the initialization red channel image sequence correspond to the average value elements in the average value matrix. In practice, the execution subject can sort the initialization red channel images according to the generation time of the images corresponding to the initialization red channel images included in the initialization red channel image set, and obtain the sorted initialization red channel image set as the initialization red channel image sequence.
[0036] In a second step, the number of each initialized red channel image included in the initialized red channel image set is determined as image number information.
[0037] The third step is to perform the following initialization steps for each average element in the above average matrix:
[0038] In the first initialization step, the sum of each pixel value corresponding to the above average value element in each initialized red channel image included in the above initialized red channel image sequence is determined as pixel sum information.
[0039] In the second initialization step, the ratio of the above pixel sum information to the above image quantity information is determined as the target element value.
[0040] The third initialization step is to initialize the average value element by the target element value to obtain the initialized average value. Here, the initialization process can be understood as replacing the average value element with the target element value to complete the initialization process of the average value element.
[0041] The fourth step is to determine the matrix composed of each initialized average value as the initial average value matrix.
[0042] Step 106 , initializing the variance value matrix according to the initialization red channel image set to obtain an initial variance value matrix.
[0043] In some embodiments, based on the above-mentioned initialized red channel image set, the above-mentioned execution subject may initialize the above-mentioned variance value matrix to obtain an initial variance value matrix.
[0044] In some optional implementations of some embodiments, according to the above-mentioned initialized red channel image set, the above-mentioned execution subject may initialize the above-mentioned variance value matrix through the following steps to obtain an initial variance value matrix:
[0045] In the first step, for each variance value element in the above variance value matrix, perform the following initialization steps:
[0046] In the first initialization step, each pixel value corresponding to the above-mentioned variance value element in each initialized red channel image included in the above-mentioned initialized red channel image sequence is determined as a pixel value sequence.
[0047] In the second initialization step, the sum of squares of differences between each pixel value included in the pixel value sequence and the variance value element is determined as pixel variance sum information.
[0048] In a third initialization step, a ratio of the pixel variance sum information to the image quantity information is determined as a target variance value.
[0049] In the fourth initialization step, the variance value element is initialized by the target variance value to obtain an initialized variance value. Here, the initialization process can be understood as replacing the variance value element with the target variance value to complete the initialization process of the variance value element. For example, the target variance value can be 5, and the variance value element can be 2. The initialized variance value element can be 5.
[0050] In the second step, the matrix composed of the obtained initialization variance values is determined as the initial variance value matrix.
[0051] Step 107: Determine a sequence of red channel images in the red channel image sequence that does not satisfy the average value matrix initialization condition as a red channel image sequence to be encoded.
[0052] In some embodiments, the execution subject may determine a sequence of red channel images in the red channel image sequence that do not satisfy the average value matrix initialization condition as a red channel image sequence to be encoded. In practice, the execution subject may determine a sequence of red channel images in the red channel image sequence that do not satisfy the average value matrix initialization condition as a red channel image sequence to be encoded. Here, the red channel images may be sorted according to the generation time of the images corresponding to the red channel images to obtain an image sequence.
[0053] Step 108: for each red channel image to be encoded in the sequence of red channel images to be encoded, perform the following encoding steps:
[0054] Step 1081, for each pixel point in the red channel image to be encoded, generate red channel encoding information according to the initial mean value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point.
[0055] In some embodiments, for each pixel point in the red channel image to be encoded, the execution entity may generate red channel encoding information according to the initial average value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point.
[0056] Furthermore, in the process of adopting technical solutions to solve the technical problems mentioned in the background technology, it is found that users have high requirements for the operating efficiency of the encoding device and low requirements for encoding power consumption. To meet the high requirements for the operating efficiency of the encoding device and low requirements for encoding power consumption, the conventional technical solution is to use a Poisson encoder (obtain the grayscale value in its channel; divide its grayscale value by the highest color level (the highest color level of an 8-bit image is 255) and use the obtained value as a probability; perform 16 Bernoulli experiments, and record the positive result as 1 and the negative result as 0. Then: encode all channels of a single pixel in the image through the above operation; encode all pixels in the image through the above operation; encode the image through the above operation; encode each frame of the image sequence or video through the above operation, thereby completing the encoding operation). However, this method requires a large number of random numbers to be generated (16 Bernoulli experiments), which affects the operating efficiency of the encoding device, and the encoding quality of the image information depends more on the frequency of the encoder (16 Bernoulli experiments require 16 samplings), which is easy to cause high encoding power consumption. Therefore, in practice, considering the requirements of users for the operation efficiency and power consumption of the encoding device, it is decided to use a technical solution of encoding the 8-bit RGB image sequence by using 4-bit hard coding (coding information on the left side of the channel) and 4-bit random trial soft coding (coding information on the right side of the channel). This can meet the requirements of users for higher operation efficiency and lower power consumption of the encoding device.
[0057] In some optional implementations of some embodiments, according to the initial average value matrix, the initial variance value matrix and the pixel values corresponding to the pixel points, the execution subject may generate red channel encoding information through the following steps:
[0058] In the first step, the initial average value element corresponding to the pixel point in the initial average value matrix is determined as the corresponding average value element.
[0059] In the second step, the initial variance value element corresponding to the pixel point in the initial variance value matrix is determined as the corresponding variance value element.
[0060] The third step is to generate an element interval set according to the above corresponding average value elements and the above corresponding variance value elements. In practice, according to the above corresponding average value elements and the above corresponding variance value elements, the above execution subject can generate an element interval set by the following steps:
[0061] In the first sub-step, the product of the corresponding variance value element and the first preset threshold is determined as the first variation coefficient. The first preset threshold may be a pre-set threshold. Here, the first preset threshold may be 1.
[0062] The second sub-step is to determine the product of the corresponding variance value element and the second preset threshold as the second variation coefficient. The second preset threshold may be a pre-set threshold. Here, the second preset threshold may be 2.
[0063] The third sub-step is to determine the product of the corresponding variance value element and the third preset threshold as the third variation coefficient. The third preset threshold may be a pre-set threshold. Here, the third preset threshold may be 3.
[0064] The fourth sub-step is to determine the product of the corresponding variance value element and the fourth preset threshold as the fourth variation coefficient. The fourth preset threshold may be a pre-set threshold. Here, the fourth preset threshold may be 4.
[0065] The fifth sub-step is to determine the first element interval according to the corresponding average value element and the first variation coefficient. In practice, first, the execution subject may determine the difference between the corresponding average value element and the first variation coefficient as the starting point information of the first element interval. Then, the sum of the corresponding average value element and the first variation coefficient is determined as the ending point information of the first element interval. Finally, the interval formed by the starting point information of the first element interval and the ending point information of the first element interval may be determined as the first element interval. The first element interval may be an open interval.
[0066] The sixth sub-step is to determine the second element interval according to the corresponding average value element and the second variation coefficient. In practice, first, the execution subject may determine the difference between the corresponding average value element and the second variation coefficient as the starting point information of the second element interval. Then, the sum of the corresponding average value element and the second variation coefficient is determined as the ending point information of the second element interval. Finally, the interval formed by the starting point information of the second element interval and the ending point information of the second element interval may be determined as the second element interval. The second element interval may be an open interval.
[0067] The seventh sub-step is to determine the third element interval according to the corresponding average value element and the third variation coefficient. In practice, first, the execution subject may determine the difference between the corresponding average value element and the third variation coefficient as the starting point information of the third element interval. Then, the sum of the corresponding average value element and the third variation coefficient is determined as the ending point information of the third element interval. Finally, the interval formed by the starting point information of the third element interval and the ending point information of the third element interval may be determined as the third element interval. The third element interval may be an open interval.
[0068] The eighth sub-step is to determine the fourth element interval according to the corresponding average value element and the fourth variation coefficient. In practice, first, the execution subject may determine the difference between the corresponding average value element and the fourth variation coefficient as the starting point information of the fourth element interval. Then, the sum of the corresponding average value element and the fourth variation coefficient is determined as the ending point information of the fourth element interval. Finally, the interval formed by the starting point information of the fourth element interval and the ending point information of the fourth element interval may be determined as the fourth element interval. The fourth element interval may be an open interval.
[0069] In a ninth sub-step, the first element interval, the second element interval, the third element interval and the fourth element interval are determined as an element interval set.
[0070] Step 4: Determine the left side coding information of the red channel according to the above element interval set and the above pixel value. In practice, according to the above element interval set and the above pixel value, the above execution subject can determine the left side coding information of the red channel through the following steps:
[0071] In the first step, for each element interval in the above element interval set, perform the following steps:
[0072] In a first sub-step, in response to the pixel value being within the element interval, a first preset coding threshold is determined as coding information corresponding to the element interval. The first preset coding threshold may be a pre-set coding threshold. Here, the first preset coding threshold may be 1.
[0073] The second sub-step is, in response to the pixel value not being within the element interval, determining the second preset coding threshold as the coding information corresponding to the element interval. The second preset coding threshold may be a pre-set coding threshold. Here, the second preset coding threshold may be 0.
[0074] The second step is to splice the determined coded information to generate the coded information on the left side of the red channel. Here, the execution subject can sequentially splice the coded information corresponding to the element interval set in the order of the first element interval, the second element interval, the third element interval and the fourth element interval to obtain the coded information on the left side of the red channel.
[0075] The fifth step is to generate the probability value corresponding to the above pixel point according to the preset probability distribution function, the above corresponding average value element, the above corresponding variance value element and the above pixel value. In practice, the above execution subject generates the probability value corresponding to the above pixel point through the following steps:
[0076] In the first sub-step, the difference between the pixel value and the corresponding average value element is determined as the difference information.
[0077] The second sub-step is to determine the ratio of the difference information to the corresponding variance value element to the power of one half as the integral variable corresponding to the preset probability distribution function. The preset probability distribution function may be a pre-set probability distribution function. Here, the preset probability distribution function may be a standard normal distribution function.
[0078] The third sub-step is to determine the probability value of the integral variable corresponding to the above-mentioned preset probability distribution function by searching a preset standard normal distribution table, wherein the above-mentioned preset standard normal distribution table can be a pre-set normal distribution table corresponding to the above-mentioned standard normal distribution function.
[0079] Step 6: Determine the coded information on the right side of the red channel according to the preset random function and the above probability value. In practice, according to the preset random function and the above probability value, the above execution subject can determine the coded information on the right side of the red channel through the following steps:
[0080] The first step is to use a preset random function to generate random numbers corresponding to a preset number threshold to obtain a random number set.
[0081] The second step is to sort the random numbers included in the above random number set according to the time when the random numbers were generated, and obtain the sorted random numbers as a random number sequence.
[0082] The third step is to perform the following steps for each random number in the random number sequence:
[0083] In a first sub-step, in response to determining that the random number is less than or equal to the probability value, the first preset coding threshold is determined as coding information corresponding to the random number.
[0084] The second sub-step is, in response to determining that the random number is greater than the probability value, determining the second preset coding threshold as the coding information corresponding to the random number.
[0085] The fourth step is to splice the determined coding information to generate the coding information on the right side of the red channel. Here, the execution subject can splice the coding information in sequence according to the order of the random numbers corresponding to the coding information in the random number sequence to obtain the coding information on the right side of the red channel.
[0086] In the seventh step, the red channel left side coding information and the red channel right side coding information are combined to generate red channel coding information. Here, the combination processing method can be splicing.
[0087] The above-mentioned first to seventh steps and their related contents serve as an inventive point of an embodiment of the present disclosure, which solves the technical problem that "using a Poisson encoder to conduct 16-fold Bernoulli experiments requires a large number of random numbers to be generated, which affects the operating efficiency of the encoding device, and the encoding quality of the image information is more dependent on the frequency of the encoder (16-fold Bernoulli experiments require 16 sampling times), which easily leads to high encoding power consumption and cannot better meet the user's requirements for the operating efficiency and encoding power consumption of the encoding device." The factors that lead to the use of Poisson encoders for 16-fold Bernoulli experiments require a large number of random numbers to be generated, which affects the operating efficiency of the encoding device, and the encoding quality of the image information is more dependent on the frequency of the encoder (16-fold Bernoulli experiments require 16 samplings), which easily leads to high encoding power consumption, and cannot well meet the user's requirements for the operating efficiency and encoding power consumption of the encoding device. If the above factors are solved, it can achieve the effect of reducing the number of random numbers to be generated (16-fold Bernoulli experiments), improving the operating efficiency of the encoding device, and the encoding quality of the image information is less dependent on the frequency of the encoder (16-fold Bernoulli experiments require 16 samplings), and reducing the encoding power consumption. In order to achieve this effect, the present invention adopts a technical solution to encode an 8-bit RGB image sequence by using a 4-bit hard coding and a 4-bit random trial soft coding method, so as to meet the user's requirements for higher operating efficiency of the encoding device and lower encoding power consumption.
[0088] Step 1082, determining a red channel coding information sequence according to each of the generated red channel coding information.
[0089] In some embodiments, the execution subject may determine a sequence of red channel coding information according to the generated red channel coding information. In practice, the execution subject may sort the red channel coding information according to the positions of the pixels corresponding to the generated red channel coding information (from top to bottom, from left to right), and obtain the sorted red channel coding information as a sequence of red channel coding information. Thus, the image coding of a single frame of red channel image is completed.
[0090] Step 1083, generating an updated average matrix based on the red channel image to be encoded and the initial average matrix.
[0091] In some embodiments, based on the red channel image to be encoded and the initial average value matrix, the execution entity may generate an updated average value matrix.
[0092] In some optional implementations of some embodiments, based on the red channel image to be encoded and the initial average value matrix, the execution subject may generate an updated average value matrix through the following steps:
[0093] The first step is to determine the target window image corresponding to the red channel image to be encoded in the red channel image sequence to be encoded according to the red channel image to be encoded and the preset image window threshold. Among them, the preset image window threshold can be a preset image window threshold. Here, the preset image window threshold can be the same as the preset sequence number threshold. The preset image window threshold can be used to determine the red channel image sequence (the image sequence includes the red channel image to be encoded) before the red channel image to be encoded and adjacent to the red channel image to be encoded. Here, the determined red channel image sequence is used to update the initial mean value matrix and the initial variance value matrix. Thereby facilitating the extraction of dynamic feature information between images in the image sequence. The target window image corresponding to the red channel image to be encoded can be the red channel image to be encoded corresponding to the red channel image of the first frame in the red channel image sequence. For example, the preset image window threshold can be 5. The red channel image to be encoded can be the red channel image to be encoded of the 100th frame in the red channel image sequence to be encoded. The target window image can be the red channel image to be encoded of the 96th frame in the red channel image sequence to be encoded.
[0094] In the second step, for each initial mean value element in the initial mean value matrix, perform the following steps:
[0095] In the first sub-step, the pixel value of the red channel pixel to be encoded corresponding to the initial average value element in the red channel image to be encoded is determined as the first pixel value.
[0096] In the second sub-step, the pixel value of the target window pixel point corresponding to the initial average value element in the target window image is determined as the second pixel value.
[0097] The third sub-step is to determine the difference between the first pixel value and the second pixel value as pixel difference information.
[0098] The fourth sub-step is to determine the ratio of the above pixel difference information to the above preset image window threshold as pixel ratio information.
[0099] The fifth sub-step is to determine the sum of the above pixel ratio information and the above initial average value element as the updated average value.
[0100] In the third step, a matrix composed of the determined updated average values is determined as an updated average value matrix.
[0101] Step 1084, generating an updated variance value matrix based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix.
[0102] In some embodiments, based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix, the execution entity may generate an updated variance value matrix.
[0103] In some optional implementations of some embodiments, based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix, the execution subject may generate an updated variance value matrix through the following steps:
[0104] In the first step, for each initial variance value element in the initial variance value matrix, perform the following steps:
[0105] In a first sub-step, the pixel value of the red channel pixel to be encoded corresponding to the initial variance value element in the red channel image to be encoded is determined as a third pixel value.
[0106] In a second sub-step, the pixel value of the target window pixel point corresponding to the initial variance value element in the target window image is determined as a fourth pixel value.
[0107] The third sub-step is to determine the difference between the square of the third pixel value and the square of the fourth pixel value as square difference information.
[0108] The fourth sub-step is to determine the ratio of the square difference information to the preset image window threshold as the square ratio information.
[0109] The fifth sub-step is to determine the initial average value element in the initial average value matrix corresponding to the initial variance value element as the first average value element.
[0110] The sixth sub-step is to determine the updated average value element in the updated average value matrix corresponding to the initial variance value element as the second average value element.
[0111] The seventh sub-step is to determine the difference between the square of the first average value element and the square of the second average value element as the average difference information.
[0112] In the eighth sub-step, an updated variance value is determined according to the initial variance value element, the average difference value information and the square ratio value information. In practice, the execution entity may determine the sum of the initial variance value element, the average difference value information and the square ratio value information as the updated variance value.
[0113] In the second step, a matrix composed of the determined update variance values is determined as an update variance value matrix.
[0114] Step 1085: determine the updated average value matrix as the initial average value matrix to update the initial average value matrix.
[0115] In some embodiments, the execution subject may determine the updated average value matrix as the initial average value matrix to update the initial average value matrix. In practice, the execution subject may determine the updated average value matrix as the initial average value matrix to update the initial average value matrix.
[0116] Step 1086: determine the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix.
[0117] In some embodiments, the execution subject may determine the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix. In practice, the execution subject may determine the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix.
[0118] Step 109: determine the determined red channel coding information sequences as a red channel coding information sequence set.
[0119] In some embodiments, the execution subject may determine the determined red channel coding information sequences as a red channel coding information sequence set. In practice, the execution subject may determine the determined red channel coding information sequences as a red channel coding information sequence set.
[0120] Step 110 , generating a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix.
[0121] In some embodiments, according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix, the execution subject may generate a green channel coding information sequence set and a blue channel coding information sequence set. In practice, first, according to the green channel image sequence, the average value matrix and the variance value matrix, the execution subject may generate a green channel coding information sequence set in the manner of steps 104 to 109. Then, according to the blue channel image sequence, the average value matrix and the variance value matrix, the blue channel coding information sequence set may be generated in the manner of steps 104 to 109.
[0122] Step 111 : Generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set.
[0123] In some embodiments, according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set, the execution entity may generate pulse signal information corresponding to the image sequence.
[0124] In some optional implementations of some embodiments, according to the red channel coding information sequence set, the green channel coding information sequence set, and the blue channel coding information sequence set, the execution subject may generate the pulse signal information corresponding to the image sequence through the following steps:
[0125] The first step is to perform the following steps for each red channel encoding information sequence in the above red channel encoding information sequence set:
[0126] In a first sub-step, the red channel coding information sequence and the green channel coding information sequence corresponding to the red channel coding information sequence in the green channel coding information sequence set are combined to generate a first combined coding information sequence. Here, the combination processing method may be splicing. For example, the red channel coding information sequence may be A, and the green channel coding information sequence corresponding to the red channel coding information sequence in the green channel coding information sequence set may be B. The first combined coding information sequence may be AB.
[0127] The second sub-step is to combine the first combined coded information sequence with the blue channel coded information sequence corresponding to the red channel coded information sequence in the blue channel coded information sequence set to generate a second combined coded information sequence. Here, the combination processing method can be splicing. For example, the blue channel coded information sequence corresponding to the red channel coded information sequence can be C, and the second combined coded information sequence can be ABC.
[0128] The second step is to combine the generated second combination coding information sequences to generate pulse signal information corresponding to the above image sequence. In practice, the above execution subject can splice the generated second combination coding information sequences to obtain the spliced second combination coding information sequences as the pulse signal information corresponding to the above image sequence.
[0129] Optionally, the above method further includes:
[0130] The pulse signal information corresponding to the image sequence is stored in an associated memory, wherein the associated memory may be the memory where the execution subject is located.
[0131] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the pulse signal information generation method of some embodiments of the present disclosure, the amount of redundant information carried by the generated pulse signal information can be reduced, and the detection effect of the moving target in the image sequence can be improved. Specifically, the redundant information carried by the generated pulse signal information is large (the encoded pulse signal information repeats the information encoding of the same part between the images), which leads to poor detection effect of the moving target in the image sequence, that is, the detection time is long, and the power consumption required by the detection device is high. The reason is that: the single-frame image of the image sequence is encoded frame by frame, resulting in the generated pulse signal information having only the static information of the single-frame image, and because the adjacent different images in the image sequence carry more repeated information, the redundant information carried by the generated pulse signal information is large (the encoded pulse signal information repeats the information encoding of the same part between the images), which leads to poor detection effect of the moving target in the image sequence, that is, the detection time is long, and the power consumption required by the detection device is high. Based on this, the pulse signal information generation method of some embodiments of the present disclosure, first, obtains the image sequence. Thus, an image sequence representing the original image information can be obtained. Then, the image sequence is subjected to channel separation processing to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence. Thus, a red channel image sequence, a green channel image sequence and a blue channel image sequence representing different channel information of the image sequence can be obtained. Afterwards, a mean value matrix and a variance value matrix are constructed. Among them, the size of the mean value matrix is the same as the size of the image in the image sequence. The size of the mean value matrix is the same as the size of the variance value matrix. Each red channel image in the red channel image sequence that meets the initialization condition of the mean value matrix is determined as an initialized red channel image set. According to the initialized red channel image set, the mean value matrix is initialized to obtain an initial mean value matrix. Thus, the mean value matrix with the same size as the image can be initialized based on the images of several consecutive frames in the image sequence to obtain an initial mean value matrix. Subsequently, according to the initialized red channel image set, the variance value matrix is initialized to obtain an initial variance value matrix. Thus, the variance value matrix with the same size as the image can be initialized based on the images of several consecutive frames in the image sequence to obtain an initial variance value matrix. Then, the sequence of red channel images in the red channel image sequence that do not meet the above average value matrix initialization condition is determined as the red channel image sequence to be encoded. Thus, the red channel image sequence to be encoded that needs to be encoded can be determined, so that it can be used to capture the dynamic information of the moving target in the image sequence.Then, for each red channel image to be encoded in the above-mentioned sequence of red channel images to be encoded, the following encoding steps are performed: for each pixel in the above-mentioned red channel image to be encoded, red channel encoding information is generated according to the above-mentioned initial average matrix, the above-mentioned initial variance value matrix and the pixel value corresponding to the above-mentioned pixel. Thus, the red channel encoding information can be obtained, thereby completing the encoding of a pixel in the red channel image. Then, according to the generated red channel encoding information, the red channel encoding information sequence is determined. Thus, the red channel encoding information sequence can be obtained, thereby completing the encoding of a single frame of red channel image. Secondly, based on the above-mentioned red channel image to be encoded and the above-mentioned initial average matrix, an updated average matrix is generated. Based on the above-mentioned red channel image to be encoded, the above-mentioned initial average matrix, the above-mentioned updated average matrix and the above-mentioned initial variance value matrix, an updated variance value matrix is generated. Thus, an updated average matrix and an updated variance value matrix can be obtained, which can be used to encode the next frame of image. Then, the above-mentioned updated average matrix is determined as the initial average matrix to update the initial average matrix. Thus, the updating of the initial average matrix can be completed. The updated variance value matrix is determined as the initial variance value matrix to update the initial variance value matrix. Thus, the initial variance value matrix can be updated. Afterwards, the determined red channel coding information sequences are determined as the red channel coding information sequence set. Thus, the red channel coding information sequence set can be obtained, thereby completing the coding of each red channel image corresponding to the image sequence. Subsequently, according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix, a green channel coding information sequence set and a blue channel coding information sequence set are generated. Thus, a green channel coding information sequence set and a blue channel coding information sequence set can be obtained, thereby completing the coding of each green channel image and each blue channel image corresponding to the image sequence. Finally, according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set, the pulse signal information corresponding to the image sequence is generated. Thus, the pulse signal information corresponding to the image sequence can be obtained, thereby completing the coding of the image sequence. Also, by constructing a mean value matrix and a variance value matrix of the same size as the images in the image sequence, and initializing the mean value matrix and the variance value matrix based on several consecutive frames of images, an initial mean value matrix and an initial variance value matrix with contextual dynamic information of the image sequence are obtained. Also, because the initial mean value matrix and the initial variance value matrix corresponding to each frame of the image to be encoded can be updated based on the inter-frame difference, the dynamic information of the moving target in the image sequence can be continuously captured.This can reduce the amount of redundant information carried by the generated pulse signal information (the encoded pulse signal information has fewer repetitions in the encoding of the same part of the information between images), and improve the detection effect of moving targets in image sequences, that is, the detection time is shorter and the power consumption required by the detection equipment is lower.
[0132] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a pulse signal information generating device, and these device embodiments are Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0133] like Figure 2As shown, the pulse signal information generating device 200 of some embodiments includes: an acquisition unit 201, a channel separation processing unit 202, a construction unit 203, a first determination unit 204, a first initialization processing unit 205, a second initialization processing unit 206, a second determination unit 207, an execution unit 208, a third determination unit 209, a first generation unit 210 and a second generation unit 211.The acquisition unit 201 is configured to acquire an image sequence; the channel separation processing unit 202 is configured to perform channel separation processing on the above image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; the construction unit 203 is configured to construct an average value matrix and a variance value matrix, wherein the size of the above average value matrix is the same as the size of the image in the above image sequence, and the size of the above average value matrix is the same as the size of the above variance value matrix; the first determination unit 204 is configured to determine each red channel image in the above red channel image sequence that meets the average value matrix initialization condition as an initialized red channel image set; the first initialization processing unit 204 is configured to perform channel separation processing on the above image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; the construction unit 203 is configured to construct an average value matrix and a variance value matrix, wherein the size of the above average value matrix is the same as the size of the variance value matrix; the first determination unit 204 is configured to determine each red channel image that meets the average value matrix initialization condition in the above red channel image sequence ...; the construction unit 203 is configured to construct an average value matrix and a variance value matrix; the construction unit 203 is configured to construct an average The processing unit 205 is configured to initialize the above average value matrix according to the above initialized red channel image set to obtain an initial average value matrix; the second initialization processing unit 206 is configured to initialize the above variance value matrix according to the above initialized red channel image set to obtain an initial variance value matrix; the second determination unit 207 is configured to determine the sequence composed of each red channel image that does not meet the above average value matrix initialization condition in the above red channel image sequence as the red channel image sequence to be encoded; the execution unit 208 is configured to perform the following encoding steps for each red channel image to be encoded in the above red channel image sequence to be encoded: For each pixel point in the red channel image to be encoded, red channel encoding information is generated according to the initial average value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point; a red channel encoding information sequence is determined according to each red channel encoding information generated; an updated average value matrix is generated based on the red channel image to be encoded and the initial average value matrix; an updated variance value matrix is generated based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix; the updated average value matrix is determined as the initial average value matrix to update the initial average value matrix; the updated variance ... The matrix is determined as the initial variance value matrix to update the initial variance value matrix; the third determining unit 209 is configured to determine the determined red channel coding information sequences as a red channel coding information sequence set; the first generating unit 210 is configured to generate a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; the second generating unit 211 is configured to generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set.
[0134] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.
[0135] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0136] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0137] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0138] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0139] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0140] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains an image sequence; performs channel separation processing on the image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; constructs an average value matrix and a variance value matrix, wherein the size of the average value matrix is the same as the size of the image in the image sequence, and the size of the average value matrix is the same as the size of the variance value matrix; determines each red channel image in the red channel image sequence that meets the average value matrix initialization condition as an initialized red channel image set; initializes the average value matrix according to the initialized red channel image set to obtain an initial average value matrix; initializes the variance value matrix according to the initialized red channel image set to obtain an initial variance value matrix; determines a sequence composed of each red channel image in the red channel image sequence that does not meet the average value matrix initialization condition as a red channel image sequence to be encoded; for each red channel image to be encoded in the red channel image sequence to be encoded, perform the following encoding steps: for the red channel image to be encoded For each pixel point in the image, red channel coding information is generated according to the initial average value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point; a red channel coding information sequence is determined according to each generated red channel coding information; an updated average value matrix is generated based on the red channel image to be encoded and the initial average value matrix; an updated variance value matrix is generated based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix; the updated average value matrix is determined as the initial average value matrix to update the initial average value matrix; the updated variance value matrix is determined as the initial variance value matrix to update the initial variance value matrix; each determined red channel coding information sequence is determined as a red channel coding information sequence set; a green channel coding information sequence set and a blue channel coding information sequence set are generated according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; and pulse signal information corresponding to the image sequence is generated according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set.
[0142] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0143] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0144] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a channel separation processing unit, a construction unit, a first determination unit, a first initialization processing unit, a second initialization processing unit, a second determination unit, an execution unit, a third determination unit, a first generation unit, and a second generation unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the acquisition unit may also be described as a "unit for acquiring an image sequence".
[0145] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0146] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for generating pulse signal information, comprising: Get image sequence; Performing channel separation processing on the image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; Constructing a mean value matrix and a variance value matrix, wherein the size of the mean value matrix is the same as the size of the image in the image sequence, and the size of the mean value matrix is the same as the size of the variance value matrix; Determine each red channel image in the red channel image sequence that meets the average value matrix initialization condition as an initialized red channel image set; Initializing the average value matrix according to the initialized red channel image set to obtain an initial average value matrix; Initializing the variance value matrix according to the initialized red channel image set to obtain an initial variance value matrix; Determine a sequence of red channel images that do not satisfy the average value matrix initialization condition in the red channel image sequence as a red channel image sequence to be encoded; For each red channel image to be encoded in the sequence of red channel images to be encoded, the following encoding steps are performed: For each pixel point in the red channel image to be encoded, generating red channel encoding information according to the initial average value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point; Determine a red channel coding information sequence according to each generated red channel coding information; Based on the red channel image to be encoded and the initial average value matrix, generating an updated average value matrix; Generate an updated variance value matrix based on the red channel image to be encoded, the initial mean value matrix, the updated mean value matrix and the initial variance value matrix; Determining the updated average value matrix as the initial average value matrix to update the initial average value matrix; Determining the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix; Determine each determined red channel encoding information sequence as a red channel encoding information sequence set; Generate a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; Generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set; Wherein, generating an updated average value matrix based on the red channel image to be encoded and the initial average value matrix includes: According to the red channel image to be encoded and a preset image window threshold, a target window image corresponding to the red channel image to be encoded in the red channel image sequence to be encoded is determined; for each initial average value element in the initial average value matrix, the following steps are performed: Determine the pixel value of the red channel pixel to be encoded corresponding to the initial average value element in the red channel image to be encoded as the first pixel value; Determine the pixel value of the target window pixel point corresponding to the initial average value element in the target window image as the second pixel value; Determine a difference between the first pixel value and the second pixel value as pixel difference information; Determine the ratio of the pixel difference information to the preset image window threshold as pixel ratio information; Determine the sum of the pixel ratio information and the initial average value element as an updated average value; The matrix composed of the determined updated average values is determined as an updated average value matrix; wherein, the updated variance value matrix is generated based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix, including: For each initial variance value element in the initial variance value matrix, perform the following steps: Determine the pixel value of the red channel pixel to be encoded corresponding to the initial variance value element in the red channel image to be encoded as a third pixel value; Determine a pixel value of a target window pixel point corresponding to the initial variance value element in the target window image as a fourth pixel value; Determine a difference between the square of the third pixel value and the square of the fourth pixel value as square difference information; Determine the ratio of the square difference information to the preset image window threshold as square ratio information; Determine the initial average value element corresponding to the initial variance value element in the initial average value matrix as the first average value element; Determine the updated mean value element corresponding to the initial variance value element in the updated mean value matrix as the second mean value element; Determine a difference between the square of the first average value element and the square of the second average value element as average difference information; Determining an updated variance value according to the initial variance value element, the average difference information and the square ratio information; A matrix composed of the determined updated variance values is determined as an updated variance value matrix.
2. The method according to claim 1, wherein: The initializing process of the average value matrix according to the initialization red channel image set to obtain an initial average value matrix includes: Sorting the initialized red channel images included in the initialized red channel image set to obtain the sorted initialized red channel image set as an initialized red channel image sequence, wherein the pixel points of the initialized red channel images in the initialized red channel image sequence correspond to the average value elements in the average value matrix; Determine the number of each initialized red channel image included in the initialized red channel image set as image number information; For each mean value element in the mean value matrix, the following initialization steps are performed: Determine the sum of each pixel value corresponding to the average value element in each initialized red channel image included in the initialized red channel image sequence as pixel sum information; Determine a ratio of the pixel sum information to the image quantity information as a target element value; Initialize the average value element by the target element value to obtain an initialized average value; A matrix composed of various initialized average values is determined as an initial average value matrix.
3. The method according to claim 2, wherein: The initializing process of the variance value matrix according to the initialization red channel image set to obtain the initial variance value matrix includes: For each variance value element in the variance value matrix, perform the following initialization steps: Determine each pixel value corresponding to the variance value element in each initialized red channel image included in the initialized red channel image sequence as a pixel value sequence; Determine the sum of squares of differences between each pixel value included in the pixel value sequence and the variance value element as pixel variance sum information; Determine a ratio of the pixel variance sum information to the image quantity information as a target variance value; Initializing the variance value element by using the target variance value to obtain an initialized variance value; The matrix composed of the obtained initialization variance values is determined as the initial variance value matrix.
4. The method according to claim 1, wherein: The step of generating pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set comprises: For each red channel encoding information sequence in the red channel encoding information sequence set, the following steps are performed: Combining the red channel coding information sequence with a green channel coding information sequence in the green channel coding information sequence set that corresponds to the red channel coding information sequence to generate a first combined coding information sequence; Combining the first combined coded information sequence with a blue channel coded information sequence in the blue channel coded information sequence set corresponding to the red channel coded information sequence to generate a second combined coded information sequence; The generated second combined coding information sequences are combined to generate pulse signal information corresponding to the image sequence.
5. A pulse signal information generating device, comprising: an acquisition unit configured to acquire a sequence of images; a channel separation processing unit, configured to perform channel separation processing on the image sequence to generate a red channel image sequence, a green channel image sequence and a blue channel image sequence; A construction unit is configured to construct a mean value matrix and a variance value matrix, wherein the size of the mean value matrix is the same as the size of the image in the image sequence, and the size of the mean value matrix is the same as the size of the variance value matrix; A first determining unit is configured to determine each red channel image in the red channel image sequence that meets the average value matrix initialization condition as an initialized red channel image set; A first initialization processing unit is configured to perform initialization processing on the average value matrix according to the initialization red channel image set to obtain an initial average value matrix; A second initialization processing unit is configured to perform initialization processing on the variance value matrix according to the initialization red channel image set to obtain an initial variance value matrix; A second determining unit is configured to determine a sequence of red channel images in the red channel image sequence that do not meet the average value matrix initialization condition as a red channel image sequence to be encoded; The execution unit is configured to perform the following encoding steps for each red channel image to be encoded in the sequence of red channel images to be encoded: for each pixel point in the red channel image to be encoded, generate red channel encoding information according to the initial average value matrix, the initial variance value matrix and the pixel value corresponding to the pixel point; determine the red channel encoding information sequence according to the generated red channel encoding information; generate an updated average value matrix based on the red channel image to be encoded and the initial average value matrix; generate an updated variance value matrix based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix; determine the updated average value matrix as the initial average value matrix to update the initial average value matrix; determine the updated variance value matrix as the initial variance value matrix to update the initial variance value matrix; A third determining unit is configured to determine the determined red channel coding information sequences as a red channel coding information sequence set; A first generating unit is configured to generate a green channel coding information sequence set and a blue channel coding information sequence set according to the green channel image sequence, the blue channel image sequence, the average value matrix and the variance value matrix; A second generating unit is configured to generate pulse signal information corresponding to the image sequence according to the red channel coding information sequence set, the green channel coding information sequence set and the blue channel coding information sequence set; Wherein, generating an updated average value matrix based on the red channel image to be encoded and the initial average value matrix includes: Determine a target window image corresponding to the red channel image to be encoded in the red channel image sequence to be encoded according to the red channel image to be encoded and a preset image window threshold; For each initial mean value element in the initial mean value matrix, perform the following steps: Determine the pixel value of the red channel pixel to be encoded corresponding to the initial average value element in the red channel image to be encoded as the first pixel value; Determine the pixel value of the target window pixel point corresponding to the initial average value element in the target window image as the second pixel value; Determine a difference between the first pixel value and the second pixel value as pixel difference information; Determine the ratio of the pixel difference information to the preset image window threshold as pixel ratio information; Determine the sum of the pixel ratio information and the initial average value element as an updated average value; The matrix composed of the determined updated average values is determined as an updated average value matrix; wherein, the updated variance value matrix is generated based on the red channel image to be encoded, the initial average value matrix, the updated average value matrix and the initial variance value matrix, including: For each initial variance value element in the initial variance value matrix, perform the following steps: Determine the pixel value of the red channel pixel to be encoded corresponding to the initial variance value element in the red channel image to be encoded as a third pixel value; Determine a pixel value of a target window pixel point corresponding to the initial variance value element in the target window image as a fourth pixel value; Determine a difference between the square of the third pixel value and the square of the fourth pixel value as square difference information; Determine the ratio of the square difference information to the preset image window threshold as square ratio information; Determine the initial average value element corresponding to the initial variance value element in the initial average value matrix as the first average value element; Determine the updated mean value element corresponding to the initial variance value element in the updated mean value matrix as the second mean value element; Determine a difference between the square of the first average value element and the square of the second average value element as average difference information; Determining an updated variance value according to the initial variance value element, the average difference information and the square ratio information; A matrix composed of the determined updated variance values is determined as an updated variance value matrix.
6. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Three-dimensional adaptive compression reconstruction method based on liquid crystal hyperspectral calculation imaging system
CN113008370A
Rapid target scene information extraction method under massive image condition
CN114926753A