Binary image retrieval method
A binary image and pixel technology, applied in the field of data processing, can solve the problems of not considering computational efficiency and complex algorithms, and achieve the effect of improving the recognition rate and computational efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0037] see figure 1 Shown is a specific embodiment of the binary image retrieval method of the present application, figure 1 It is a flow chart of the binary image retrieval method in Embodiment 1 of the present invention. The method includes the steps of:
[0038] Step 101, preset a two-dimensional array according to the number of bits of the CPU and the size of the binary image in the database;
[0039] Step 102, converting each binary image in the database into a first binary number, and filling the first binary number into a preset two-dimensional array bit by bit;
[0040] In step 102, the first binary number is filled bit by bit into the preset two-dimensional array, and optionally, the first binary number is filled into the two-dimensional array by using a shift operation. In this embodiment, the first binary number is filled into the two-dimensional array through a shift operation, which is faster than direct assignment and improves retrieval speed.
[0041] Wherei...
Embodiment 2
[0060] The application provides another embodiment of the binary image retrieval method, the method includes steps:
[0061] Step 201, preset a two-dimensional array according to the number of bits of the CPU and the size of the binary image in the database;
[0062] Step 202, converting each binary image in the database into a first binary number, and filling the first binary number into a preset two-dimensional array bit by bit;
[0063] In step 202, the first binary number is filled bit by bit into the preset two-dimensional array, and optionally, the first binary number is filled into the two-dimensional array by using a shift operation. The first binary number is filled into the two-dimensional array through a shift operation, which is faster than direct assignment and improves retrieval speed.
[0064] The pixel in the binary image in the database is black, and the bit of the corresponding first binary number is 1, and the pixel in the binary image in the database is wh...
Embodiment 3
[0087] This embodiment is an application embodiment:
[0088] There are 7 images in the database, and the w and h of the images are 3 and 5 respectively, so each image corresponds to a fifteen-digit binary number. Assuming that the number of bits of the CPU is 4, the CPU can process a 4-bit binary integer at a time. Let the integers corresponding to 7 images be 128, 256, 1024, 64, 36, 1040, 16 respectively. The integer corresponding to the image to be queried is 1024. Then the size of the array is [7,4]. Sort the array in ascending order and save the index value. Then the array content is:
[0089]
[0090] The query image converted to an integer is 0, 8, 0, 0. The binary search process is:
[0091] First compare with the fourth row in the middle of the array. The highest 4-bit binary converted integers are compared first, both are equal to 0. Then continue to compare the second 4-digit converted integer. The image to be queried is 8, the data in the fourth row is 1...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

