CN105205171B - Image search method based on color characteristic - Google Patents

Image search method based on color characteristic Download PDF

Info

Publication number
CN105205171B
CN105205171B CN201510660442.3A CN201510660442A CN105205171B CN 105205171 B CN105205171 B CN 105205171B CN 201510660442 A CN201510660442 A CN 201510660442A CN 105205171 B CN105205171 B CN 105205171B
Authority
CN
China
Prior art keywords
color
image
target
histogram
rgb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510660442.3A
Other languages
Chinese (zh)
Other versions
CN105205171A (en
Inventor
石旭刚
刘嘉
汤泽胜
李冲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OB TELECOM ELECTRONICS CO Ltd
Original Assignee
OB TELECOM ELECTRONICS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OB TELECOM ELECTRONICS CO Ltd filed Critical OB TELECOM ELECTRONICS CO Ltd
Priority to CN201510660442.3A priority Critical patent/CN105205171B/en
Publication of CN105205171A publication Critical patent/CN105205171A/en
Application granted granted Critical
Publication of CN105205171B publication Critical patent/CN105205171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses the image search methods based on color characteristic, the technical solution of offer is using color characteristic as starting point, by analyzing monitor video, obtaining the foreground area of each frame of moving target makes it constitute entire motion target sequence, for each frame image of moving target, obtain bianry image, the profile and bounding box information of each target, foreground area binary map, 8 sample frames are obtained to moving target sequential sampling, the global color histogram of target original image and mask figure calculating moving target sequences based on 8 sample frames, piecemeal color histogram, feature of the domain color probability characteristics as moving target, support domain color search and to scheme to search figure two ways, the search need of monitor video Small object and medium sized target can be better met.

Description

Image search method based on color characteristic
Technical field
The present invention relates to the image retrieval technologies of field of video monitoring, more particularly to the image retrieval side based on color characteristic Method.
Background technology
With universal and Video Supervision Technique the development of video monitoring equipment, there is a large amount of vedio data daily It generates and is stored, how effectively to find relevant content in the vedio data of magnanimity is abundant mining data valence Value has to the problem of facing.
Analysis for monitor video, general thinking are that significant moving target/object is extracted by moving object detection Body records the movable information and feature of target, to greatly simplify the difficulty of analysis, saves a large amount of analysis time.Usually The clarification of objective of record will include diversified feature such as classification(People, vehicle, object), size, track, car plate(If target Classification be vehicle if), the direction of motion, color, texture etc..
Color is most popular one kind in the feature used in monitor video analysis, is easy to unite because it is easy to expression Meter, is also easier to analyze.The calculating of usual color characteristic is to carry out quantization dimensionality reduction in given color space then to count target The statistic histogram of region pixel, more applications further include divide then statistics piecemeal histogram to target area Figure.The method in quantized color space is actually a kind of hard plot to color space, in order to preferably be matched and be searched for, More careful division is needed, then the image of the same target shot in different time can be caused because of the difference of illumination variation Image is caused to be difficult to match, another problem is that colour cast caused by illumination variation to become difficult according to domain color retrieval, For example we want to check the target of all red, we just must be known by which correspondence of multiple subintervals that hard plot obtains Any domain color also is difficult to conclude to be any color for our human eyes in the color in different domain color transition section, It can be more difficult in the case of there are colour cast.
Invention content
In view of the above technical defects, the present invention proposes the image search method based on color characteristic.
In order to solve the above-mentioned technical problem, technical scheme is as follows:
Image search method based on color characteristic, includes the following steps:
11)Monitor video is analyzed, detects and divides the moving target occurred in video, obtain the every of moving target The foreground area of one frame makes its constitute entire motion target sequence, for each frame image of moving target, obtain bianry image, The profile and bounding box information of each target obtain the foreground area binary map of moving target, i.e., by profile information Mask schemes;In mask figures, 0 indicates background pixel, and 1 indicates foreground pixel, the i.e. position of target;
12)8 sample frames are obtained to moving target sequential sampling, target original image and mask based on 8 sample frames Figure calculates the global color histogram, piecemeal color histogram, domain color probability characteristics of moving target sequence as moving target Feature, store to index file;
13)When querying condition is given rgb values, which is found with nearest neighbor method, for rope 8 of all targets in quotation part, each target sample the maximum that domain color probability characteristics in features correspond to the rgb values As the similarity of the target and specified rgb colors, finally user is returned to after all targets foundation similarity height sequences;
When given querying condition is image and the mask figures that foreground is marked, calculate the figure global color histogram, Piecemeal color histogram calculates the color of its 8 sample frames and image to be checked one by one for all targets in index file All targets are finally pressed phase by histogram similarity using the maximum similarity as the target and given query image of result User is returned to like degree height.
Further, global color histogram calculating includes the following steps:
21)The pixel data of image is subjected to color space conversion, hsv or lab are converted to from rgb;
22)Transformed color space is quantified, color histogram of the statistical picture foreground area in the color space Figure information, joint color histogram feature hist1s of the color space mark flag as image, i.e., using the flag as feature to One dimension of amount.
Further, piecemeal color histogram calculating includes the following steps:
31)The ellipse of an encirclement foreground area is calculated according to the mask of image figures, and by elliptical long axis direction alpha As the direction of image, the mask foreground areas marked are divided into two sub-regions along elliptical short axle and distinguish accumulative histogram Information hist2, hist3,
32)Above-mentioned flag, alpha, hist1, hist2, hist3 constitute the histogram feature of image.
Further, when given querying condition is image and the mask figures that foreground is marked, given threshold beta;It calculates Inquire global color histogram, the piecemeal color histogram of picture;The case where for given image as inquiry input, two figures The difference of the alpha of picture is considered as dissmilarity more than beta's;It is similar to calculate color histogram within beta for the difference of alpha value The similarity as query image and image to be checked is spent, calculation is (sim1 × sim2)/(sim1+sim2);sim1 It is respectively hist2 with sim2, after the corresponding Euclidean distances of hist3, is normalized using sigmod functions as similarity; The calculation formula that sigmod functions are normalized is 1/ (1+e^ (- x)).
Further, domain color probability distribution calculating includes the following steps:
51)Cluster centre is chosen in rgb color spaces, cluster centre selects in the vertex of rgb color cubes, side Point, face center select a point as ash at rgb color cubes center as the center of black, white and common color The center of color, finally obtains m cluster centre, and the m can be chosen according to actual needs;
52)Rgb color spaces are carried out by 8 × 8 × 8 sizes to divide non-overlapping subinterval, for three dimensions in the spaces rgb Degree is divided into 32 sections per dimension, and the spaces rgb are divided into 32768 subintervals, and 256 in each subinterval A pixel calculates separately k neighbour's cluster centres, carries out weight distribution by the distance of pixel to cluster centre, adds up 256 pictures The weight of element is simultaneously normalized, and obtains the domain color probability distribution in subinterval;
53)Subinterval is calculated to the distance of each domain color and carries out k neighbour's weight distributions and obtains domain color probability distribution.
The beneficial effects of the present invention are:Technical solution provided by the invention supports master using color characteristic as starting point Color searches for and to scheme to search figure two ways, has following effect:
1, by combining whole histogram and blocked histogram that can support solid color inquiry and composite coloured inquiry, energy Enough better meet the search need of monitor video Small object and medium sized target;
2, preferably domain color is supported to inquire by choosing the cluster centre for being easy to express its color;
3, domain color probability histogram is counted in the form of probability, colour cast is asked caused by capable of preferably adapting to illumination etc. Topic, has good tolerance for a certain range of colour cast.
Description of the drawings
Fig. 1 is the main flow scanned for using color characteristic;
Fig. 2 is the main flow of feature calculation.
Specific implementation mode
With reference to specific embodiment and attached drawing, the present invention is described further.
As shown in Figure 1, when analyzing one section of monitor video, first has to detect and divide the movement mesh occurred in video Mark, the foreground area that each frame of target is then obtained using tracking constitute entire motion sequence, for target movement Each frame image obtains the wheel of each target based on the bianry image that motion detection is divided using contour tracing method Wide and bounding box information, conversely, can also obtain the foreground area binary map of target by profile information, i.e. mask figures are described Mask figures are corresponding with original image one secondary bianry image, and 0 indicates background pixel, and 1 indicates foreground pixel, the i.e. position of target It sets.
Moving target sequence is sampled to obtain 8 sampled points, that is, takes 8 sample frames to calculate feature and is used as the movement Clarification of objective describes, the global color of target original image and mask figure calculating target motion sequences based on 8 sample frames Histogram, piecemeal color histogram, domain color probability distribution are stored as clarification of objective to index file.
Target may continue hundreds of to thousands of frames etc., and by sampling, one side avoids a large amount of calculating and storage is empty Between, on the other hand the matching result by using the highest result of matching degree as target and querying condition, can effectively keep away Exempt from the undesirable situation of a certain frame detection result.
Color histogram feature includes global color histogram, piecemeal color histogram, wherein global color histogram Computational methods are:Video frame images pixel data is subjected to color space conversion, hsv or lab are converted to from rgb;To conversion Color space afterwards is quantified, and adds up display foreground region in the color histogram information of the color space, joint color sky Between one as feature vector of mark color histogram feature hist1s of the flag as image, the united meaning i.e. flag Dimension;Simple example is as follows:The color histogram has 128 dimensions, then global characteristics histogram has 129 dimensions, the first dimension to have recorded face Colour space information, remaining is color histogram information.
The computational methods of piecemeal color histogram are:An encirclement foreground area is calculated according to the mask of video frame images figures Ellipse, and using elliptical long axis direction alpha as the direction of image, the foreground zone for marking mask along elliptical short axle Domain is divided into two sub-regions difference accumulative histogram information hist2, hist3;Hist2 and hist3 is corresponded to is divided into two pieces by target Obtained piecemeal color histogram.
For aforesaid statistical global color histogram and piecemeal color histogram feature, first by input picture from rgb face Color space transformation is hsv color spaces, and is 27 subintervals by hsv color space quantizations, then counts target in subinterval Distribution form global color histogram feature.Global color histogram does not reflect the spatial distribution of color, therefore by image 3 × 3 blocks are divided into, by piecemeal color histogram to reflect the spatial distribution of color.
Above-mentioned flag, alpha, hist1, hist2, hist3 constitute the color histogram feature of image.Flag is as color Spatial information needs to confirm that subsequent histogram is same by comparing flag before subsequently carrying out similarity calculation Color space statistics as a result, hist2 and hist3 are corresponded to is divided into two pieces of obtained piecemeal color histograms by target, follow-up When carrying out similarity calculation, latter two histogram obtains a similarity, is then weighted with the similarity of color histogram Summation obtains final similarity output.
The computational methods of domain color Probability Characteristics are:
Cluster centre point is chosen in rgb color spaces, cluster centre selection is on the vertex of rgb color cubes or side The center in midpoint or face selects a point as grey as black, the center of white and common color, at cube center Center, finally obtain m cluster centre, it is 10 that can take m as required, it is corresponding it is common it is red, orange, yellow, green, green, blue, It is purple, black, white, grey, finer division can be also carried out as needed;
Selection for aforementioned cluster centre adds rgb color cubes center outside 8 vertex of rgb color-space choosings Total 9 points of point are cluster centre, and color of each point is clearly to be easy to expression, contain common black, white, Grey and common colour are required for similar " targets of all red of inquiry " are such, for given input rgb values (255,0,0)As input, fuzzy semantic meaning representation is portrayed well with number, user is specified by palette Arbitrary rgb values inquiry, can determine that user wishes the domain color of inquiry, it is contemplated that colour cast shadow that may be present by arest neighbors It rings, corresponding all targets of the domain color can be given to a higher matching degree, be allowed to appear in every other uncorrelated mesh Before mark, have been able to help user to reduce search time significantly, it usually can also be in conjunction with other feature query compositions to obtain more Satisfied result.
Rgb color spaces are carried out by 8 × 8 × 8 sizes to divide non-overlapping subinterval, for three dimensions in the spaces rgb, It is divided into 256/8 i.e. 32 section per dimension, the spaces rgb are divided into 32 × 32 × 32 i.e. 32768 subinterval, (Three dimensions of rgb are respectively sampled by step-length 8, are obtained between 32768 8 × 8 × 8 cube blocks)Each 256 pixels in subinterval calculate separately k neighbour's cluster centres, and weight point is carried out by the distance of pixel to cluster centre Match, add up the weight of 256 pixels and be normalized, obtains the domain color probability distribution in subinterval;Subinterval is calculated to arrive The distance of each domain color simultaneously carries out k neighbour's weight distributions and obtains domain color probability distribution, uses Euclidean distance, calculates k neighbours When k be 5.
As shown in Fig. 2, when inquiry input is image, according to the threshold value beta of default setting, the image is equally calculated Global color histogram, piecemeal color histogram;For all targets in index file, calculate one by one its 8 sample frames with The similarity of the color histogram of image to be checked, the difference of the alpha of two images is more than in the image and index file of input Beta's is considered as dissmilarity;The difference of alpha value calculates histogram similarity as query graph in index file within beta As the similarity with image to be checked, calculation is (sim1 × sim2)/(sim1+sim2);Sim1 and sim2 are respectively It is normalized using sigmod functions as similarity after the corresponding Euclidean distance of hist2, hist3, with the maximum work of result For the similarity of the target and given query image, all targets are finally returned into user by similarity height, wherein The calculation formula of sigmod normalized functions is 1/ (1+e^ (- x)).
When inquiry is with domain color or given rgb values, the master belonging to the domain color or rgb values is first calculated with nearest neighbor method Color, for all targets in index file, in 8 sampling features of each target, domain color probability characteristics, which correspond to, is somebody's turn to do Similarity of the maximum of rgb values as the target and specified rgb colors, after finally all targets sort according to similarity height Return to user.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art Member, without departing from the inventive concept of the premise, can also make several improvements and modifications, these improvements and modifications also should be regarded as In the scope of the present invention.

Claims (4)

1. the image search method based on color characteristic, which is characterized in that include the following steps:
11)Monitor video is analyzed, the moving target occurred in video is detected and divide, obtains each frame of moving target Foreground area so that its is constituted entire motion target sequence, for each frame image of moving target, obtain bianry image, each The profile and bounding box information of a target obtain the foreground area binary map of moving target, i.e. mask figures by profile information; In mask figures, 0 indicates background pixel, and 1 indicates foreground pixel, the i.e. position of target;
12)8 sample frames are obtained to moving target sequential sampling, target original image and mask figure meters based on 8 sample frames Calculate the spy of the global color histogram, piecemeal color histogram, domain color probability characteristics of moving target sequence as moving target Sign, stores to index file;
13)When querying condition is given rgb values, which is found with nearest neighbor method, for index text 8 of all targets in part, each target sample the maximum conduct that domain color probability characteristics in features correspond to the rgb values The similarity of the target and specified rgb colors finally returns to user after all targets foundation similarity height sequences;When given When querying condition is image and the mask figures that foreground is marked, its global color histogram, piecemeal color histogram are calculated, for All targets in index file calculate the color histogram similarity of its 8 sample frames and image to be checked, with result one by one All targets are finally returned to user by the maximum similarity as the target and given query image by similarity height;
The calculating of domain color probability distribution includes the following steps:
51)Rgb color spaces choose cluster centre, cluster centre selection the vertex of rgb color cubes, side midpoint, The center in face selects a point as grey as the center of black, white and common color at rgb color cubes center Center, finally obtain m cluster centre, the m can be chosen according to actual needs;
52)Rgb color spaces are carried out by 8 × 8 × 8 sizes to divide non-overlapping subinterval, for three dimensions in the spaces rgb, 32 sections are divided into per dimension, the spaces rgb are divided into 32768 subintervals, 256 pictures in each subinterval Element calculates separately k neighbour's cluster centres, and weight distribution is carried out by the distance of pixel to cluster centre, accumulative 256 pixels Weight is simultaneously normalized, and obtains the domain color probability distribution in subinterval;
53)The pixel in subinterval is calculated to the distance of each domain color and carries out k neighbour's weight distributions and obtains domain color probability Distribution.
2. the image search method according to claim 1 based on color characteristic, which is characterized in that global color histogram Calculating includes the following steps:
21)The pixel data of video frame images is subjected to color space conversion, hsv or lab are converted to from rgb;
22)Transformed color space is quantified, statistical picture foreground area is believed in the color histogram of the color space Breath, color histogram feature hist1s of the joint color space mark flag as image, i.e., using the flag as feature vector One dimension.
3. the image search method according to claim 2 based on color characteristic, which is characterized in that piecemeal color histogram Calculating includes the following steps:
31)According to the mask of image figure calculate one encirclement foreground area ellipse, and using elliptical long axis direction alpha as The mask foreground areas marked are divided into two sub-regions along elliptical short axle and distinguish accumulative histogram information by the direction of image Hist2, hist3,
32)Above-mentioned flag, alpha, hist1, hist2, hist3 constitute the histogram feature of image.
4. the image search method according to claim 3 based on color characteristic, which is characterized in that when given querying condition For image and when the mask figures of foreground are marked, given threshold beta;Calculate global color histogram, the piecemeal face of inquiry picture Color Histogram;The case where for given image as inquiry input, the difference of the alpha of two images is considered as not phase more than beta Seemingly;It is similar to image to be checked as query image to calculate color histogram similarity within beta for the difference of alpha value Degree, calculation are (sim1 × sim2)/(sim1+sim2);Sim1 and sim2 is respectively hist2, the corresponding Euclideans of hist3 away from From rear, it is normalized using sigmod functions as similarity;The calculation formula that sigmod functions are normalized is 1/ (1+ e^(-x))。
CN201510660442.3A 2015-10-14 2015-10-14 Image search method based on color characteristic Active CN105205171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510660442.3A CN105205171B (en) 2015-10-14 2015-10-14 Image search method based on color characteristic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510660442.3A CN105205171B (en) 2015-10-14 2015-10-14 Image search method based on color characteristic

Publications (2)

Publication Number Publication Date
CN105205171A CN105205171A (en) 2015-12-30
CN105205171B true CN105205171B (en) 2018-09-21

Family

ID=54952854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510660442.3A Active CN105205171B (en) 2015-10-14 2015-10-14 Image search method based on color characteristic

Country Status (1)

Country Link
CN (1) CN105205171B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787965B (en) * 2016-01-26 2018-08-07 安徽创世科技股份有限公司 A kind of image search method based on color characteristic
CN107193816B (en) * 2016-03-14 2021-03-30 杭州华为企业通信技术有限公司 Image searching method, virtual character image obtaining method and device
CN106228165A (en) * 2016-07-27 2016-12-14 维沃移动通信有限公司 A kind of method of photo classification and mobile terminal
CN106600659B (en) * 2016-12-05 2019-06-04 浙江工商大学 Diversified color table method for drafting based on stochastical sampling point
CN107908630A (en) * 2017-06-28 2018-04-13 重庆完美空间科技有限公司 Material picture color classification retrieving method
CN108537134B (en) * 2018-03-16 2020-06-30 北京交通大学 Video semantic scene segmentation and labeling method
CN109271932A (en) * 2018-09-17 2019-01-25 中国电子科技集团公司第二十八研究所 Pedestrian based on color-match recognition methods again
CN113255781B (en) * 2021-05-28 2022-04-01 上海市胸科医院 Representative picture selecting method and device for CP-EBUS and diagnosis system
CN116737982B (en) * 2023-08-11 2023-10-31 拓锐科技有限公司 Intelligent screening management system for picture search results based on data analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6246790B1 (en) * 1997-12-29 2001-06-12 Cornell Research Foundation, Inc. Image indexing using color correlograms
CN102156707A (en) * 2011-02-01 2011-08-17 刘中华 Video abstract forming and searching method and system
CN102509118A (en) * 2011-09-28 2012-06-20 安科智慧城市技术(中国)有限公司 Method for monitoring video retrieval
CN103413330A (en) * 2013-08-30 2013-11-27 中国科学院自动化研究所 Method for reliably generating video abstraction in complex scene
CN103440348A (en) * 2013-09-16 2013-12-11 重庆邮电大学 Vector-quantization-based overall and local color image searching method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6246790B1 (en) * 1997-12-29 2001-06-12 Cornell Research Foundation, Inc. Image indexing using color correlograms
CN102156707A (en) * 2011-02-01 2011-08-17 刘中华 Video abstract forming and searching method and system
CN102509118A (en) * 2011-09-28 2012-06-20 安科智慧城市技术(中国)有限公司 Method for monitoring video retrieval
CN103413330A (en) * 2013-08-30 2013-11-27 中国科学院自动化研究所 Method for reliably generating video abstraction in complex scene
CN103440348A (en) * 2013-09-16 2013-12-11 重庆邮电大学 Vector-quantization-based overall and local color image searching method

Also Published As

Publication number Publication date
CN105205171A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN105205171B (en) Image search method based on color characteristic
Chen et al. Quality-guided key frames selection from video stream based on object detection
CN102207966B (en) Video content quick retrieving method based on object tag
CN102819582B (en) Quick searching method for mass images
CN105141903B (en) A kind of method for carrying out target retrieval in video based on colouring information
GB2431793A (en) Image comparison
CN104978567B (en) Vehicle checking method based on scene classification
US8340412B2 (en) Image processing
CN111046789A (en) Pedestrian re-identification method
CN108829711B (en) Image retrieval method based on multi-feature fusion
CN104899899A (en) Color quantification method based on density peak value
Saad et al. Image retrieval based on integration between YCbCr color histogram and texture feature
Cheng et al. Matching of objects moving across disjoint cameras
Chowdhury et al. Detection of human presence in a surveillance video using fuzzy approach
CN106096496A (en) A kind of fire monitoring method and system
CN109993128B (en) Method for quantifying attribute features of pedestrian image
CN109064444B (en) Track slab disease detection method based on significance analysis
Miah et al. An empirical analysis of visual features for multiple object tracking in urban scenes
CN108573217B (en) Compression tracking method combined with local structured information
Gorisse et al. IRIM at TRECVID 2010: semantic indexing and instance search
Katsenou et al. Understanding video texture—A basis for video compression
Mouats et al. Fusion of thermal and visible images for day/night moving objects detection
CN109325946A (en) A kind of hazardous chemical stacking monitoring method and system
Chung et al. Fuzzy color quantization and its application to scene change detection
Chen et al. A practical method for video scene segmentation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant