Image processing method, system, camera device, server and storage medium
By encrypting the images captured by the camera and generating key information, the problem of image data leakage during transmission is solved, thus protecting data security and user privacy and ensuring that only the final recognition result is output.
Patent Information
- Application Number
- CN202310104441.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-01-30
AI Technical Summary
In image acquisition scenarios related to user privacy, there is a risk of data leakage during image data transmission or on the server side, making it impossible to effectively guarantee the security of user privacy information.
The target image is encrypted by the camera device, and the corresponding key information is generated. The encrypted image and key information are then transmitted to the server. The server decrypts the image based on the key information and outputs the image recognition result, ensuring that the image is invisible during transmission and only the final recognition result is output.
It achieves encrypted protection of image information during transmission to ensure data security, and only outputs the final image recognition result on the server side to further protect the security of user privacy information.
Smart Images

Figure CN116208394B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer vision technology, and in particular to an image processing method, system, camera device, server and storage medium. Background Technology
[0002] With the development of computer vision technology, cameras are being used in an increasing number of scenarios, such as access control, shopping malls, stores, banks, and ride-hailing services. Typically, the image data captured by cameras is directly transmitted to a server for further processing. However, this approach poses a significant risk to user privacy in image capture scenarios such as facial recognition and customer profiling. If data leakage occurs during transmission or on the server side, the security of user privacy information, such as facial data, cannot be guaranteed. Summary of the Invention
[0003] In view of the above problems, this disclosure is made in order to provide an image processing method, system, camera device, server and storage medium that is conducive to improving the above problems or at least partially improving the above problems.
[0004] In a first aspect, embodiments of this disclosure provide an image processing method applied to a camera device, the method comprising:
[0005] The target image captured by the camera device is encrypted to obtain an encrypted target image, and key information corresponding to the encrypted target image is generated.
[0006] The target encrypted image and its corresponding key information are transmitted to the server, so that the server can decrypt the target encrypted image based on the key information, recognize the decrypted image, and output the image recognition result.
[0007] Further, the step of encrypting the target image captured by the camera device to obtain an encrypted target image, and generating key information corresponding to the encrypted target image, includes:
[0008] Determine the image encryption parameters;
[0009] The pixel positions in the target image are adjusted based on the image encryption parameters to obtain the target encrypted image;
[0010] Based on the image encryption parameters, generate the key information corresponding to the target encrypted image.
[0011] Further, the image encryption parameters include: the number of pixel groups and the pixel disorder sequence. Adjusting the pixel positions in the target image based on the image encryption parameters includes:
[0012] The pixel units in the target image are grouped according to the number of pixel groups to obtain multiple groups of pixel data arranged in sequence.
[0013] The multiple sets of pixel data are reordered based on the pixel disorder sequence.
[0014] Furthermore, the pixel units in the target image are grouped based on the number of pixel groups to obtain multiple groups of pixel data arranged in sequence, including:
[0015] Along a specified direction, starting from the k-th pixel unit in the target image, extract one pixel unit every M-1 pixel units. Divide the k-th pixel unit and the extracted pixel units into a group as the k-th group of pixel data, where M is the number of pixel groups in the specified direction, and k ranges from 1 to M.
[0016] Furthermore, the image encryption parameters also include: the total number of pixel units in the target image, and before selecting a pixel unit every M-1 pixel units starting from the k-th pixel unit in the target image, the parameters also include:
[0017] If the total number of pixel units is a non-integer multiple of M, then a specified number of pseudo-pixel units are added to the target image so that the number of pixel units in each group of pixel data is the same, wherein the pixel values in the pseudo-pixel units are randomly generated.
[0018] Furthermore, the image encryption parameters further include: an adjustment identifier sequence, the adjustment identifier sequence including multiple adjustment identifiers, each adjustment identifier corresponding to pixel data in a corresponding position after reordering; adjusting the pixel positions in the target image based on the image encryption parameters, further including:
[0019] For each group of pixel data after reordering, if the corresponding adjustment identifier in the adjustment identifier sequence is a first type identifier, then pixel adjustment processing is performed on the group of pixel data; if the corresponding adjustment identifier in the adjustment identifier sequence is a second type identifier, then the group of pixel data remains unchanged.
[0020] Furthermore, any one or more of the pixel group number, the pixel disorder sequence, and the adjustment identifier sequence are randomly generated.
[0021] Furthermore, the image recognition result includes one or more of the following results:
[0022] Face detection results, face recognition results, face tracking results, customer profiling results, and user behavior recognition results.
[0023] Secondly, embodiments of this disclosure provide an image processing method, the method comprising:
[0024] Receive the encrypted target image and corresponding key information transmitted by the camera device;
[0025] The target encrypted image is decrypted based on the key information, and the decrypted image is then identified.
[0026] Output image recognition results.
[0027] Furthermore, the method also includes: if an image viewing request is received, then performing permission verification on the sending end of the image viewing request; if the verification is successful, then transmitting the decrypted image to the sending end.
[0028] Furthermore, the image recognition result includes a face recognition result. Before receiving the target encrypted image and corresponding key information transmitted by the camera device, the method further includes:
[0029] Receive encrypted reference face image and corresponding key information transmitted by camera device, and store the reference face image and corresponding key information in a preset face information database.
[0030] Thirdly, embodiments of this disclosure provide an image processing system, including a camera device and a server, wherein:
[0031] The camera device is used to encrypt the captured target image to obtain an encrypted target image, and generate key information corresponding to the encrypted target image; the encrypted target image and the corresponding key information are then transmitted to the server.
[0032] The server is used to receive the target encrypted image and the corresponding key information transmitted by the camera device, decrypt the target encrypted image based on the key information, recognize the decrypted image, and output the image recognition result.
[0033] Fourthly, embodiments of this disclosure provide a camera device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the image processing method described in the first aspect.
[0034] Fifthly, embodiments of this disclosure provide a server, including: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the image processing method described in the second aspect above.
[0035] In a sixth aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the steps of the image processing method described in the first or second aspect.
[0036] The technical solutions provided in this disclosure have at least the following technical effects or advantages:
[0037] The image processing method, system, camera device, server, and storage medium provided in this disclosure embodiment encrypt the captured target image and generate corresponding key information. The encrypted target image and key information are then transmitted to the server. This ensures that even if data leakage occurs during transmission, the captured image information remains encrypted and invisible, thus guaranteeing data transmission security. Furthermore, the server outputs the image recognition result; the decrypted image serves only as intermediate data. Ordinary users cannot see the intermediate data, only the final image recognition result, further protecting the security of user privacy information.
[0038] The above description is merely an overview of the technical solutions provided by the embodiments of this disclosure. In order to better understand the technical means of the embodiments of this disclosure and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this disclosure more apparent and understandable, specific implementation methods of the embodiments of this disclosure are described below. Attached Figure Description
[0039] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0040] Figure 1 This is a schematic diagram of the structure of the image processing system provided in the first aspect of the present disclosure;
[0041] Figure 2 This is a schematic diagram of a scenario in an embodiment of this disclosure;
[0042] Figure 3 This is a schematic diagram of another scenario in an embodiment of this disclosure;
[0043] Figure 4 This is a flowchart of the image processing method provided in the second aspect of the embodiments of this disclosure;
[0044] Figure 5 This is a flowchart of an image processing method provided in the third aspect of the embodiments of this disclosure. Detailed Implementation
[0045] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0046] It should be noted that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The term "multiple" includes two or more cases.
[0047] In a first aspect, embodiments of this disclosure provide an image processing system. For example... Figure 1 As shown, the image processing system 10 includes a camera device 101 and a server 102 that transmit data via a network 103. It should be noted that the image processing system 10 may include one or more camera devices 101, or one or more servers 102. Figure 1 The number of camera devices 101 and servers 102 shown is for illustrative purposes only and is not intended to be limiting. The specific number will be determined based on the actual application scenario. For example, camera device 101 can be a webcam or other terminal devices with image acquisition capabilities. Server 102 can provide image processing services, such as face detection, face recognition, face tracking, customer profile drawing, and user behavior recognition, etc., which will be determined based on the actual application scenario.
[0048] In use, the camera device 101 encrypts the captured target image to obtain an encrypted target image and generates key information corresponding to the encrypted target image; the encrypted target image and the corresponding key information are then transmitted to the server 102. This ensures that even if data leakage occurs during transmission, the captured image information remains encrypted and invisible, thus guaranteeing the security of the target image transmission.
[0049] It should be noted that, in this article, the target image refers to each frame captured by the camera device 101 that needs to be transmitted to the server 102 for further processing, and the specific image is determined according to the actual usage scenario of the camera device 101. For example, in an access control scenario, the target image can be a facial image captured by the camera device 101 on the access control device; in a ride-hailing monitoring scenario, the target image can be an image of the driver and / or passenger captured by the camera device 101 installed in the ride-hailing vehicle; and in a pedestrian flow monitoring scenario, the target image can be a customer image captured by the camera device 101 installed in a bank, store, or shopping mall.
[0050] The camera device 101 is pre-configured with an image encryption algorithm. This algorithm is used to encrypt the target image, resulting in an encrypted target image, and a key information corresponding to this encryption is generated. It should be noted that the image encryption algorithm can be any algorithm capable of both image encryption and decryption; this embodiment does not impose any restrictions on it.
[0051] In some examples, the process of encrypting the acquired target image to obtain an encrypted target image and generating key information corresponding to the encrypted target image may include: determining image encryption parameters; adjusting the pixel positions in the target image based on the image encryption parameters to obtain the encrypted target image; and generating key information corresponding to the encrypted target image based on the image encryption parameters. Encrypting the image by adjusting the pixel positions is simple and convenient, helps reduce computational load, and lowers the hardware requirements for the camera device 101.
[0052] There are various ways to adjust pixel positions, as long as the goal of concealing the true content of the original image is achieved. Image encryption parameters are determined based on the specific image encryption algorithm used. In some examples, image encryption parameters may include: the number of pixel groups and the pixel disorder sequence. Correspondingly, the process of adjusting pixel positions in the target image based on the image encryption parameters may include: grouping pixel units in the target image according to the number of pixel groups to obtain multiple sets of sequentially arranged pixel data; and reordering these multiple sets of pixel data based on the pixel disorder sequence.
[0053] The number of pixel groups is greater than or equal to 2, depending on the resolution of the target image and the needs of the actual scene. The pixel scrambling sequence is a sequence composed of broken sequential numbers, with the number of numbers being the same as the number of pixel groups for the corresponding pixel unit. In some examples, the number of pixel groups and / or the pixel scrambling sequence can be randomly generated. For example, a range of pixel unit group numbers can be pre-configured, and a random number of groups within this range can be selected as the number of pixel groups for this encryption. After grouping, the sequential numbers corresponding to multiple groups of pixel data are randomly shuffled to obtain the pixel scrambling sequence. In this case, the number of groups and / or the shuffling order are different each time, and the key information corresponding to different target encrypted images is also different, which helps to improve encryption security.
[0054] A pixel unit can include pixel rows and / or pixel columns. That is, pixel positions can be adjusted by row and / or column, and the following three methods will be explained in detail.
[0055] The first method is row-by-row adjustment. In this case, the number of pixel groups refers to the number of row groups, and the pixel scrambling sequence refers to the corresponding row scrambling sequence. The number of sorted elements in the row scrambling sequence is the same as the number of row groups. For example, in practical implementation, the number of row groups can be determined first. Based on the number of row groups, the pixels in the target image are grouped by row to obtain multiple sets of pixel data arranged in sequence. Each set of pixel data includes at least one row of pixels, and the number of pixel rows in each set can be the same or different. Then, the row scrambling sequence is determined, and the multiple sets of pixel data are shuffled and reordered according to the row scrambling sequence.
[0056] For example, let M represent the number of pixel groups. After grouping, the original order of the pixel data in the M groups is 1, 2, ..., M. In the row scrambling sequence, the order of 1 to M is shuffled. For example, the row scrambling sequence is: 3, 10, 5, 1, M, ... That is, the pixel data previously numbered 3 is rearranged and placed in position 1, the data previously numbered 10 is rearranged and placed in position 2, and so on. In this way, the pixel rows can be shuffled by group, thus masking the true content of the original image.
[0057] The second method is column-based adjustment. Similar to row-based adjustment, here the number of pixel groups is the same as the number of column groups, and the pixel scrambling sequence is the corresponding column scrambling sequence. The number of sorted elements in the column scrambling sequence is the same as the number of column groups. For example, in practice, the number of column groups can be determined first. Based on the number of column groups, the pixels in the target image are grouped by column to obtain multiple sets of sequentially arranged pixel data. Each set of pixel data includes at least one column of pixels. The number of pixel columns in each set can be the same or different. Then, the column scrambling sequence is determined, and the multiple sets of pixel data are shuffled and reordered according to the column scrambling sequence.
[0058] The third method involves adjusting both rows and columns. For example, you can adjust rows first, then adjust columns based on the row adjustments, or vice versa. The specific processes for row and column adjustments are similar to the first and second methods described above, and will not be repeated here. It should be noted that the number of row groups and column groups can be different or the same, depending on the resolution of the target image and the needs of the actual scene.
[0059] Whether adjusting by row or column, there are multiple ways to group pixels. In some examples, starting from the k-th pixel unit in the target image along a specified direction, one pixel unit can be extracted every M-1 pixel units. The k-th pixel unit and the extracted pixel units at intervals are grouped together as the k-th group of pixel data, where M represents the number of pixel groups in the specified direction, and k ranges from 1 to M. For example, when the specified direction is vertical, the pixel units are pixel rows, and M represents the number of row groups; when the specified direction is horizontal, the pixel units are pixel columns, and M represents the number of column groups. In this way, since the pixel units that are spaced apart are grouped together, it is equivalent to scrambling the pixel units during the grouping process, which helps to reduce the number of groups and thus reduce the key length. Of course, other pixel grouping methods can also be used in other examples. For example, the pixel units in the target image can be divided into multiple groups of pixel data sequentially. This embodiment does not limit this.
[0060] Taking row-by-row adjustment as an example, when extracting pixel rows, the pixels in the first row are used as the first pixel row to be extracted, and the extraction proceeds from top to bottom. Alternatively, the pixels in the last row can be used as the first pixel row to be extracted, and the extraction proceeds from bottom to top. Another option is to use a specified middle row (let's say row h) as the first pixel row to be extracted, and the extraction proceeds from top to bottom to the last row and then from the first row to row h-1, or from bottom to top to the first row and then from the last row to row h+1. The specific configuration can be customized according to actual needs.
[0061] Taking the first row of pixels in the target image as the first pixel row to be extracted as an example, the resolution of the target image is W×H, that is, there are H pixel rows in total. Let M be the number of row groups. After grouping, the first group of pixel data is composed of pixels from row 1, row 1+M, row 1+2M, etc.; the second group is composed of pixels from row 2, row 2+M, row 2+2M, etc., and so on, with the Mth group being composed of pixels from row M, row 2M, row 3M, etc. For ease of understanding, let's take H=9 and M=3 as an example. k can be 1, 2, or 3. When k is 1, the pixels from rows 1, 4, and 7 are grouped together as the first group of pixel data; when k is 2, the pixels from rows 2, 5, and 6 are grouped together as the second group of pixel data; and when k is 3, the pixels from rows 3, 6, and 9 are grouped together as the third group of pixel data.
[0062] In some examples, the image encryption parameters mentioned above also include the total number of pixel units in the target image. After determining the number of pixel groups, it can be first determined whether the total number of corresponding pixel units in the target image is an integer multiple of the number of pixel groups M. If so, the step of grouping the pixel units in the target image based on the number of pixel groups described above is executed. If not, a specified number of pseudo pixel units can be added to the target image first, and then the step of grouping the pixel units in the target image based on the number of pixel groups described above is executed to ensure that the number of pixel units in each group of pixel data is the same.
[0063] The pseudo-pixel units are not part of the actual target image content; the pixel values within a pseudo-pixel unit can be randomly generated. Besides ensuring an equal number of pixel units in each group of pixel data, the pseudo-pixel units also serve to obfuscate the real image content, further masking the true content of the original image and enhancing the security of the target image.
[0064] Accordingly, during the row-by-row adjustment process, the total number of pixel units is equal to the number of pixel rows, and the pseudo-pixel units are pseudo-pixel rows, which are pixel rows where pixel values are randomly generated. For example, the specified number h of pseudo-pixel rows... n According to the formula: h n =ceil(H / M1)×M1-H. Here, ceil is the floor function, H is the number of pixel rows in the target image, and M1 represents the number of row groups for clarity. Of course, in other examples, more pseudo-pixel rows can be added, depending on the specific needs of the scenario and the transmission bandwidth.
[0065] During column-by-column adjustment, the total number of pixel units is equal to the number of pixel columns, and the pseudo-pixel units are pseudo-pixel columns, i.e., pixel columns with randomly generated pixel values. For example, a specified number w of pseudo-pixel columns. n According to the formula: w n =ceil(W / M2)×M2-W. Where W is the number of pixel columns in the target image, and M2 is used here to represent the number of column groups for clarity. Of course, in other examples, more pseudo-pixel columns can be added, depending on the specific needs of the scenario and the transmission bandwidth.
[0066] In some examples, the image encryption parameters mentioned above also include an adjustment identifier sequence. The adjustment identifier sequence includes multiple adjustment identifiers, each corresponding to a pixel data position after reordering. The adjustment identifiers in the sequence are divided into two categories: a first category and a second category. In this case, after rearranging multiple sets of pixel data, the process of adjusting the pixel positions in the target image based on the image encryption parameters may further include: for each reordered set of pixel data, if the corresponding adjustment identifier in the above adjustment identifier sequence is a first category identifier, then pixel adjustment processing is performed on that set of pixel data; if the corresponding adjustment identifier in the above adjustment identifier sequence is a second category identifier, then the set of pixel data remains unchanged.
[0067] There are multiple ways to set the first and second type identifiers. For example, the identifier sequence can be a sequence of "0" and "1", where "1" is the first type identifier and "0" is the second type identifier. Another example is that the identifier sequence can be a sequence of numbers from 0 to 9, where odd numbers are the first type identifier and even numbers are the second type identifier. This embodiment does not limit this.
[0068] The pixel adjustment processing here refers to adjusting pixel data within a group. Keeping the group of pixel data unchanged means not performing intra-group pixel adjustments on the corresponding pixel data. In some examples, intra-group pixel adjustment can be a positional transformation of pixels within the group. For example, in row-by-row adjustment, the adjustment identifier sequence is a row adjustment identifier sequence. If the adjustment identifier corresponding to the current group of pixel data in the row adjustment identifier sequence is a first-type identifier, then the pixels in the current group of pixel data can be transformed symmetrically left and right. Similarly, in column-by-column adjustment, the adjustment identifier sequence corresponds to a column adjustment identifier sequence. If the adjustment identifier corresponding to the current group of pixel data in the column adjustment identifier sequence is a first-type identifier, then the pixels in the current group of pixel data can be transformed symmetrically up and down. Of course, besides positional transformations, other intra-group pixel adjustment methods can also be used, such as changing the values of pixels within the pixel data group; this embodiment does not limit this.
[0069] In some examples, the adjustment identifier sequence can be randomly generated. For instance, a corresponding number of 0s and 1s can be randomly generated according to the number of pixel groups to form the adjustment identifier sequence. In this case, the pixel data groups that need to be adjusted within each group are different for each encryption, and the key information corresponding to different target encrypted images is also different, which helps to improve encryption security.
[0070] In addition to encrypting the target image, it is also necessary to generate the key information corresponding to the encrypted target image based on the image encryption parameters. In some examples, the image encryption parameters can be concatenated to generate the key information corresponding to the encrypted target image. For example, the image encryption parameters include: the number of pixel columns of the target image, i.e., the resolution (columns) of the camera device 101; the number of pixel rows of the target image, i.e., the resolution (rows) of the camera device 101; the number of row groups; the row disorder sequence; the row adjustment identifier sequence; the number of column groups; the column disorder sequence; and the column adjustment identifier sequence. The key information is generated by concatenating these parameters in sequence.
[0071] For example, image encryption parameters can be expressed as strings. In this case, the strings representing each parameter can be concatenated together as key information and transmitted to server 102 along with the target encrypted image.
[0072] For ease of understanding, the following example illustrates a key generation rule. In this example, the image encryption parameters include: 1) number of pixel columns; 2) number of pixel rows; 3) number of row blocks; 4) row scrambling sequence; 5) row adjustment identifier sequence; 6) number of column blocks; 7) column scrambling sequence; and 8) column adjustment identifier sequence.
[0073] For example, the number of pixel columns, pixel rows, row groups, and column groups are identified using 8-digit decimal numbers. Each number in the row and column disorder sequences is represented by a 4-digit decimal number. Each number in the row and column adjustment identifier sequences is a single number, either 0 or 1. The number of row groups, column groups, row and column disorder sequences, row and column adjustment identifier sequences are all randomly generated. Taking a camera device 101 with a resolution of 640×360, 150 randomly generated row blocks, and 100 randomly generated column blocks as an example, the parameters in items 1)-8) above can be represented by the following strings: 1)00000640 2)00000360 3)00000150 4) 0024000301470049004500650044008801460074000100840104010501230067 0059009100970072004801490089001300050109003900930132002100320077 0030002900220052012001260006000000100116007001210060004700140128 0135014800190139009401020058007500500011014300640086006100810133 0124007300530071003700260131009900960141007901420098003600780107 0108013701340043001501400114011201180063000901290057014500540069 0125005600120110007601150106004200310119000400410016013001030083 0085013600080095001701130028006600800092003301220038008201000111 0034005100020018004601380087011701440007012700250027005500680020 00900023006200350101004 5)01000110100000001000100000000010000111011000100100001100001110011 11100010001000101010111001000010000011011011011011101110000110111 01001100000110001101 6)00000100 7)0039007900490084002000070002009500610043001400780098000500940097 0003001500640041000900630029007600130065009100330075002100550030 0040001200920034008600890090001600480073007000190000007400500068 0046008200470006001100260004006000800053003200370099008300770042 0028004400010031005600850067000800540051008100270052009600450058 0087001000240025006200170018003500690088006600930038002200590071 0036007200230057 8)00110111100011001110001010110101111011001100011001110010101101 10001011010101111010101101000100011
[0100] By concatenating the strings 1)-8) above in sequence, the key information corresponding to this encryption can be generated.
[0101] Afterward, the target encrypted image and its corresponding key information can be transmitted to server 102. Upon receiving the target encrypted image and corresponding key information transmitted by camera device 101, server 102 decrypts the target encrypted image based on the key information, recognizes the decrypted image, and outputs the image recognition result. In other words, the output from server 102 is the image recognition result; the decrypted image is merely intermediate data. Ordinary users cannot see the intermediate data, only the final image recognition result, which helps to further protect the security of user privacy information.
[0102] Server 102 is configured with an image decryption algorithm corresponding to the image encryption algorithm in camera device 101. Based on the received key information, the target encrypted image can be decrypted. It can be understood that the image decryption process is the reverse operation of the image encryption process, which will not be detailed here.
[0103] Server 102 is also equipped with an image recognition algorithm, which is used to recognize the decrypted image. The image recognition algorithm can be configured according to the actual application scenario, and may include, but is not limited to, one or more of the following: face detection algorithm, face recognition algorithm, face tracking algorithm, gender recognition algorithm, age recognition algorithm, and behavior recognition algorithm.
[0104] Accordingly, image recognition results may include one or more of the following: face detection results, face recognition results, face tracking results, customer profiling results, and user behavior recognition results. For example, face detection results can be used to characterize whether a target image contains a face; face recognition results are the identification results of faces in the target image, i.e., whether they match faces in a preset face information database; face tracking results may include: the position and size of faces in the target image; customer profiling results may include: the male-to-female ratio, age ratio, and time period of entry among customers; user behavior recognition results are used to characterize whether users in the target image engage in illegal behavior and the type of illegal behavior.
[0105] In some application scenarios, after recognizing the target image, server 102 can clear the corresponding encrypted target image and its key information to avoid occupying the storage resources of server 102 and reduce the storage requirements of server 102. In other application scenarios, server 102 can also store the received encrypted target image and its key information locally for later retrieval. In specific implementation, whether or not it is necessary to store the encrypted target image and its key information locally can be determined according to the actual application scenario; this embodiment does not impose any restrictions on this.
[0106] Furthermore, to enrich the functionality of this system and meet the needs of certain special scenarios, server 102 can also grant certain specific users permission to view the decrypted images. These specific users can send image viewing requests to server 102 through a client in their user terminal. For example, the user terminal can be a mobile phone, tablet computer, laptop computer, wearable device, personal computer, etc., and this embodiment does not impose any restrictions on this.
[0107] If server 102 receives an image viewing request, it verifies the permissions of the sender of the request. If the verification is successful, the server transmits the decrypted image to the sender. If the verification fails, the server does not send back the decrypted image. For example, permission verification can be performed using biometric identification methods such as face, iris, or fingerprint, or it can be performed using an account and password. This embodiment does not impose any restrictions on this method.
[0108] In some examples, facial recognition is used for authorization verification. In this case, the user terminal has a camera function, which encrypts the captured facial image and transmits the encrypted image along with the corresponding key information to server 102. Server 102 uses the key information to decrypt the received facial image and matches the decrypted image against a preset facial information database. If a match is found, authorization verification is successful; otherwise, it fails. This helps protect the privacy information of authorized users.
[0109] In some application scenarios, the request is to view a target encrypted image transmitted in real time by camera device 101. In this case, the decrypted image can be split into two paths: one for image recognition and the other transmitted to the user terminal that sent the image viewing request. In other application scenarios, when server 102 stores historical target encrypted images and their key information, in addition to requesting to view the real-time transmitted target encrypted image, it is also possible to request to view historical target encrypted images. In this case, the image viewing request needs to carry an image identifier to identify the target encrypted image being viewed. If it is a historical target encrypted image, the corresponding key information is used to decrypt the historical encrypted image, and the decrypted image is transmitted to the user terminal that sent the image viewing request.
[0110] Furthermore, when the image recognition performed on server 102 involves facial recognition, such as when the image recognition result includes a facial recognition result, a facial information database needs to be pre-built. In this case, before receiving the target encrypted image and corresponding key information transmitted by camera device 101, server 102 is also used to: receive the encrypted reference facial image and corresponding key information transmitted by camera device 101, and store the encrypted reference facial image and corresponding key information in a pre-set facial information database. This encrypted storage method is beneficial for protecting the security of user privacy information.
[0111] After receiving the target encrypted image and its key information, server 102 needs to decrypt the target encrypted image and the reference face image in the face information database using their respective key information, and then match the decrypted images to obtain the face recognition result.
[0112] To facilitate understanding, the application of the above-described image processing system 10 will be explained below using two exemplary scenarios.
[0113] The first scenario is customer profiling. The camera equipment consists of surveillance cameras deployed in locations such as stores, shopping malls, and banks, while the server is a customer profiling server capable of providing customer profile creation services. For example... Figure 2 As shown, camera 201 encrypts the captured video footage by sequentially encrypting each frame of the video as the target image and generating corresponding key information. The encrypted image and key information are then transmitted over the network to customer profiling server 202 for decryption and processing using algorithms such as face detection, recognition, gender recognition, and age recognition. The final output is a customer profile, including details such as the male-to-female ratio, age ratio, and time of visit. Because the video footage captured by camera 201 is encrypted, the client can only see the final output customer profile and not the decrypted image. This approach achieves both customer profiling and protection of customer privacy.
[0114] The second scenario is access control based on facial recognition. The camera device is an access control camera, and the server is a facial recognition server capable of providing facial recognition services. In this case, such as... Figure 3 As shown, the face recognition server 302 needs to pre-build a face information database, collect reference face images of users, encrypt the reference face images and generate corresponding key information, and transmit the encrypted reference face images and key information to the face recognition server for storage in the aforementioned face information database. It should be noted that the camera device transmitting the encrypted reference face images and key information and the access control camera device 301 can be the same camera device or different camera devices, depending on the specific needs of the actual scenario.
[0115] In use, the access control camera 301 encrypts the real-time captured image of the face to be recognized and generates corresponding encrypted information. The encrypted image and its key information are then transmitted to the server via the network. The server decrypts the image and performs face recognition, returning the result. If the recognition is successful, the gate 303 opens; otherwise, it remains closed. Because the reference face images in the face database are stored encrypted, and the image of the face to be recognized is also encrypted before output, the security of user privacy information is effectively protected.
[0116] Secondly, this disclosure also provides an image processing method applied to the camera device 101 in the image processing system 10 described above. For example... Figure 4 As shown, the method may include at least the following steps S401 and S402.
[0117] Step S401: Encrypt the target image captured by the camera device to obtain the encrypted target image, and generate the key information corresponding to the encrypted target image.
[0118] In step S402, the target encrypted image and the corresponding key information are transmitted to the server so that the server can decrypt the target encrypted image based on the key information, recognize the decrypted image, and output the image recognition result.
[0119] It should be noted that the specific implementation process of steps S401 and S402 can be found in the relevant description in the first aspect embodiment above, and will not be repeated here.
[0120] In some examples, the process of encrypting a target image captured by a camera device to obtain an encrypted target image and generating key information corresponding to the encrypted target image may include: determining image encryption parameters; adjusting the pixel positions in the target image based on the image encryption parameters to obtain the encrypted target image; and generating key information corresponding to the encrypted target image based on the image encryption parameters. For specific implementation details, please refer to the relevant descriptions in the first aspect of the embodiments above, which will not be repeated here.
[0121] In some examples, the image encryption parameters include the number of pixel groups and the pixel disorder sequence. In this case, the process of adjusting the pixel positions in the target image based on the image encryption parameters may include: grouping the pixel units in the target image according to the number of pixel groups to obtain multiple sets of sequentially arranged pixel data, where each pixel unit includes a pixel row and / or pixel column; and reordering the multiple sets of pixel data based on the pixel disorder sequence. For specific implementation details, please refer to the relevant descriptions in the first aspect embodiment above, which will not be repeated here.
[0122] In some examples, pixel units in the target image are grouped based on the number of pixel groups to obtain multiple sets of sequentially arranged pixel data. This includes: starting from the k-th pixel unit in the target image along a specified direction, extracting one pixel unit every M-1 pixel units, and grouping the k-th pixel unit and the extracted pixel units at intervals into a group as the k-th set of pixel data. Here, M is the number of pixel groups in the specified direction, and k ranges from 1 to M. For a detailed implementation process, please refer to the relevant description in the first aspect embodiment above; it will not be repeated here.
[0123] In some examples, the image encryption parameters also include the total number of pixel units in the target image. Before selecting a pixel unit every M-1 pixel units starting from the k-th pixel unit in the target image, the method further includes: if the total number of pixel units is not an integer multiple of M, then supplementing the target image with a specified number of pseudo-pixel units to ensure that the number of pixel units in each group of pixel data is the same, wherein the pixel values in the pseudo-pixel units are randomly generated. For a detailed implementation process, please refer to the relevant description in the first aspect embodiment above, which will not be repeated here.
[0124] In some examples, the image encryption parameters also include an adjustment identifier sequence. The adjustment identifier sequence includes multiple adjustment identifiers, each corresponding to a pixel data position after reordering. In this case, the process of adjusting pixel positions in the target image based on the image encryption parameters further includes: for each group of reordered pixel data, if the corresponding adjustment identifier in the adjustment identifier sequence is a first-type identifier, then pixel adjustment processing is performed on that group of pixel data; if the corresponding adjustment identifier in the adjustment identifier sequence is a second-type identifier, then the group of pixel data remains unchanged. For specific implementation details, please refer to the relevant description in the first aspect embodiment above, which will not be repeated here.
[0125] In some examples, one or more of the pixel group number, pixel disorder sequence, and adjustment flag sequence are randomly generated. For details of the implementation process, please refer to the relevant description in the first aspect embodiment above, which will not be repeated here.
[0126] In some examples, the image recognition results include one or more of the following: face detection results, face recognition results, face tracking results, customer profiling results, and user behavior recognition results. See the relevant descriptions in the first aspect of the embodiments above for details.
[0127] Thirdly, this disclosure also provides an image processing method applied to the server 102 in the image processing system 10 described above. For example... Figure 5 As shown, the method may include at least the following steps S501 to S503.
[0128] Step S501: Receive the target encrypted image and corresponding key information transmitted by the camera device.
[0129] Step S502: Decrypt the target encrypted image based on the key information, and identify the decrypted image.
[0130] Step S503: Output the image recognition result.
[0131] In step S501 above, the target encrypted image is obtained by encrypting the captured target image using the camera device. The specific encryption and key information generation process can be found in the relevant description of the first aspect above, and will not be repeated here. Furthermore, the specific implementation processes of steps S502 and S503 can also be found in the relevant description of the embodiments of the first aspect above, and will not be repeated here.
[0132] In some examples, the method further includes: if an image viewing request is received, verifying the permissions of the sending end of the image viewing request; if the verification is successful, transmitting the decrypted image to the sending end. For specific implementation details, please refer to the relevant description in the first aspect embodiment above, which will not be repeated here.
[0133] In some examples, the image recognition result output in step S503 includes a face recognition result. Therefore, before receiving the target encrypted image and corresponding key information transmitted by the camera device, the method further includes: receiving the encrypted reference face image and corresponding key information transmitted by the camera device, and storing the reference face image and corresponding key information in a preset face information database. For specific implementation details, please refer to the relevant description in the first aspect embodiment above, which will not be repeated here.
[0134] Fourthly, embodiments of this disclosure also provide a camera device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps of the image processing method provided in the second aspect above. Specific image processing procedures can be found in the relevant descriptions in the first and second aspects above. For example, the camera device may be equipped with an encryption processing chip, which encrypts the acquired target image and generates corresponding key information.
[0135] Fifthly, embodiments of this disclosure also provide a server, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps of the image processing method provided in the third aspect above. Specific image processing procedures can be found in the relevant descriptions in the first and third aspects above.
[0136] Sixthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer instructions. When these computer instructions are executed on a computer, the computer performs the various processes of the image processing methods provided in the second or third aspect, achieving the same technical effect. To avoid repetition, further details are omitted here. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0137] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0138] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0141] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0142] Although preferred embodiments of this disclosure have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this disclosure.
Claims
1. An image processing method, characterized in that, Applied to a camera device, the method includes: The target image captured by the camera device is encrypted to obtain an encrypted target image, and key information corresponding to the encrypted target image is generated. The target encrypted image and the corresponding key information are transmitted to the server, so that the server can decrypt the target encrypted image based on the key information, recognize the decrypted image, and output the image recognition result. The step of encrypting the target image captured by the camera device to obtain an encrypted target image includes: Determine image encryption parameters, which include the number of pixel groups, a pixel disorder sequence, and an adjustment identifier sequence, wherein the adjustment identifier sequence includes multiple adjustment identifiers; Adjusting the pixel positions in the target image based on the image encryption parameters to obtain a target encrypted image includes: grouping the pixel units in the target image according to the pixel grouping number to obtain multiple groups of pixel data arranged in sequence; reordering the multiple groups of pixel data based on the pixel disorder sequence; each adjustment identifier in the adjustment identifier sequence corresponds to the pixel data in the corresponding position after reordering; for each group of pixel data after reordering, if the adjustment identifier corresponding to the adjustment identifier sequence is a first type identifier, then pixel adjustment processing is performed on the group of pixel data; if the adjustment identifier corresponding to the adjustment identifier sequence is a second type identifier, then the group of pixel data remains unchanged.
2. The method according to claim 1, characterized in that, The key information for generating the target encrypted image includes: Based on the image encryption parameters, generate the key information corresponding to the target encrypted image.
3. The method according to claim 2, characterized in that, The pixel units in the target image are grouped based on the number of pixel groups to obtain multiple groups of pixel data arranged in sequence, including: Along a specified direction, starting from the k-th pixel unit in the target image, extract one pixel unit every M-1 pixel units. Divide the k-th pixel unit and the extracted pixel units into a group as the k-th group of pixel data, where M is the number of pixel groups in the specified direction, and k ranges from 1 to M.
4. The method according to claim 3, characterized in that, The image encryption parameters further include: the total number of pixel units in the target image; and before selecting a pixel unit every M-1 pixel units starting from the k-th pixel unit in the target image, the parameters also include: If the total number of pixel units is a non-integer multiple of M, then a specified number of pseudo-pixel units are added to the target image so that the number of pixel units in each group of pixel data is the same, wherein the pixel values in the pseudo-pixel units are randomly generated.
5. The method according to claim 1, characterized in that, The image recognition result includes one or more of the following results: Face detection results, face recognition results, face tracking results, customer profiling results, and user behavior recognition results.
6. An image processing method, characterized in that, The method includes: The system receives a target encrypted image and corresponding key information transmitted by a camera device, wherein the target encrypted image and corresponding key information are obtained based on the image processing method according to any one of claims 1-5. The target encrypted image is decrypted based on the key information, and the decrypted image is then identified. Output the image recognition results.
7. The method according to claim 6, characterized in that, The method further includes: If an image viewing request is received, the sending end of the image viewing request is authorized. If the authorization is successful, the decrypted image is transmitted to the sending end.
8. The method according to claim 6, characterized in that, The image recognition result includes a face recognition result. Before receiving the target encrypted image and corresponding key information transmitted by the camera device, the method further includes: Receive encrypted reference face image and corresponding key information transmitted by camera device, and store the reference face image and corresponding key information in a preset face information database.
9. An image processing system, characterized in that, Includes camera equipment and servers, among which: The camera device is used to encrypt the captured target image to obtain an encrypted target image, and generate key information corresponding to the encrypted target image; the encrypted target image and the corresponding key information are then transmitted to the server. The server is used to receive the target encrypted image and the corresponding key information transmitted by the camera device, decrypt the target encrypted image based on the key information, recognize the decrypted image, and output the image recognition result. The step of encrypting the acquired target image to obtain an encrypted target image includes: Determine image encryption parameters, which include the number of pixel groups, a pixel disorder sequence, and an adjustment identifier sequence, wherein the adjustment identifier sequence includes multiple adjustment identifiers; Adjusting the pixel positions in the target image based on the image encryption parameters to obtain a target encrypted image includes: grouping the pixel units in the target image according to the pixel grouping number to obtain multiple groups of pixel data arranged in sequence; reordering the multiple groups of pixel data based on the pixel disorder sequence; each adjustment identifier in the adjustment identifier sequence corresponds to the pixel data in the corresponding position after reordering; for each group of pixel data after reordering, if the adjustment identifier corresponding to the adjustment identifier sequence is a first type identifier, then pixel adjustment processing is performed on the group of pixel data; if the adjustment identifier corresponding to the adjustment identifier sequence is a second type identifier, then the group of pixel data remains unchanged.
10. A camera device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the image processing method as described in any one of claims 1-5.
11. A server, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the image processing method as described in any one of claims 6-8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the steps of the image processing method as described in any one of claims 1-8.
Citation Information
Patent Citations
Image encryption method based on chaotic mapping and bit-level replacement
CN112084517A