Ағылшыншамен салыстырыңыз: абзацты басыңыз — түпнұсқа терезеде ашылады. Абзац астындағы EN түймесі оны мәтін ішінде көрсетеді.
Мазмұны
Кіріспе
Суреттегі түстердің таралуын көрсету
Representation of the distribution of colors in an image
Сурет өңдеу және фотосуретте түсті гистограмма – суреттегі түстердің таралуын көрсету болып табылады. Цифрлық суреттер үшін түсті гистограмма суреттің түсті кеңістігін қамтитын, барлық мүмкін түстер жиынтығын қамтитын, түстердің белгілі бір диапазонындағы пикселдердің санын көрсетеді. Түсті гистограмма кез келген түсті кеңістік үшін құрыла алады, бірақ бұл термин көбінесе RGB немесе HSV сияқты үш өлшемді кеңістіктер үшін қолданылады. Монохроматикалық суреттер үшін қарқындылық гистограммасы терминін пайдалануға болады. Көп спектрлі суреттер үшін, әр пиксел кездейсоқ өлшемдер санымен көрсетілгенде (мысалы, RGB-дағы үш өлшемнен асып түсетін), түсті гистограмма N өлшемді болады, мұнда N – алынған өлшемдер саны. Әрбір өлшемнің өзіндік толқын ұзындығы бар, олардың кейбіреулері көрінетін спектрден тыс болуы мүмкін. Егер мүмкін түстер жиынтығы жеткілікті кішкентай болса, әр түс жеке диапазонға орналастырылуы мүмкін; сонда гистограмма тек әр мүмкін түске ие пикселдердің санын көрсетеді. Көбінесе кеңістік тиісті диапазон санына бөлінеді, көбінесе әрқайсысында көптеген ұқсас түстері бар жүйелі тор түрінде орналастырылады. Түсті гистограмма пикселдер санын шамалайтын түсті кеңістікте анықталған тегіс функция ретінде де көрсетілуі және бейнеленуі мүмкін. Басқа гистограмма түрлері сияқты, түсті гистограмма – түс мәндерінің жатқан үздіксіз таралуының шамалауы ретінде қарастырылатын статистикалық мәліметтер.
In image processing and photography, a color histogram is a representation of the distribution of colors in an image. For digital images, a color histogram represents the number of pixels that have colors in each of a fixed list of color ranges, that span the image's color space, the set of all possible colors. The color histogram can be built for any kind of color space, although the term is more often used for three dimensional spaces such as RGB or HSV. For monochromatic images, the term intensity histogram may be used instead. For multi spectral images, where each pixel is represented by an arbitrary number of measurements (for example, beyond the three measurements in RGB), the color histogram is N dimensional, with N being the number of measurements taken. Each measurement has its own wavelength range of the light spectrum, some of which may be outside the visible spectrum. If the set of possible color values is sufficiently small, each of those colors may be placed on a range by itself; then the histogram is merely the count of pixels that have each possible color. Most often, the space is divided into an appropriate number of ranges, often arranged as a regular grid, each containing many similar color values. The color histogram may also be represented and displayed as a smooth function defined over the color space that approximates the pixel counts. Like other kinds of histograms, the color histogram is a statistic that can be viewed as an approximation of an underlying continuous distribution of color values.
Түс гистограммасының сипаттамалары
Түс гистограммасы түстердің кеңістіктегі орналасуына қарамастан, әртүрлі түстердің санының үлесіне ғана назар аударады. Түс гистограммасының мәндері статистикалық есептеулерден алынған. Олар түстердің статистикалық таралуын және суреттің негізгі түсін көрсетеді. Әдетте, суреттегі алдыңғы және артқы жазықтың түс таралуы әртүрлі болғандықтан, гистограммада екі өршікті таралу болуы мүмкін. Жарық гистограммасының өзінде идеалды гистограмма жоқ, және жалпы алғанда, гистограмма суреттің тым жарық немесе тым қараңғы екенін көрсетуі мүмкін, бірақ кейде гистограмманы қарап, сурет тым жарық деп ойлауыңыз мүмкін, бірақ шындығында солай емес.
A color histogram focuses only on the proportion of the number of different types of colors, regardless of the spatial location of the colors. The values of a color histogram are from statistics. They show the statistical distribution of colors and the essential tone of an image. In general, as the color distributions of the foreground and background in an image are different, there might be a bimodal distribution in the histogram. For the luminance histogram alone, there is no perfect histogram and in general, the histogram can tell whether it is over exposure or not, but there are times when you might think the image is over exposed by viewing the histogram; however, in reality it is not.
Түс гистограммасын қалыптастыру принциптері
Түс гистограммасын құру өте қарапайым. Жоғарыдағы анықтамадан, 3 RGB арнасының әрқайсысындағы 256 деңгейдегі пикселдердің санын санап, оларды 3 жеке жолақты диаграммада көрсетуге болады. Әдетте, түс гистограммасы RGB немесе HSV сияқты белгілі бір түс кеңістігіне негізделеді. Кескіндегі әртүрлі түсті пикселдерді есептегенде, егер түс кеңістігі кең болса, онда түс кеңістігін белгілі бір санға бөліп, кіші интервалдарға жіктеуге болады. Әрбір интервал "құты" деп аталады. Бұл процеске түс кванттау делінеді. Содан кейін әрбір құтыдағы пикселдердің санын санау арқылы кескіннің түс гистограммасын аламыз. Бұл принциптердің нақты қадамдарын 1-мысалда қарастыруға болады.
The formation of a color histogram is rather simple. From the definition above, we can simply count the number of pixels for each 256 scales in each of the 3 RGB channel, and plot them on 3 individual bar graphs. In general, a color histogram is based on a certain color space, such as RGB or HSV. When we compute the pixels of different colors in an image, if the color space is large, then we can first divide the color space into certain numbers of small intervals. Each of the intervals is called a bin. This process is called color quantization. Then, by counting the number of pixels in each of the bins, we get the color histogram of the image. The concrete steps of the principles can be viewed in Example 1.
Кемшіліктері мен басқа тәсілдер
Классификация үшін гистограммалардың басты кемшілігі – бейнелеу зерттелетін нысанның пішіні мен текстурасын ескермей, тек түсіне тәуелді болуы. Екі суреттің нысан мазмұны әртүрлі болса да, түс ақпараты ортақ болғандықтан, түс гистограммалары бірдей болуы мүмкін. Керісінше, кеңістіктік немесе пішін туралы ақпарат болмаса, әртүрлі түсті ұқсас нысандарды тек түс гистограммасын салыстыру арқылы ажырату қиын. Мысалы, қызыл және ақ кесе мен қызыл және ақ тарелканы ажырату мүмкін емес. Басқаша айтқанда, гистограммаға негізделген алгоритмдерде жалпы «кесе» деген түсінік жоқ, ал қызыл және ақ кесенің моделі, егер оған басқаша түсті көк және ақ кесе берілсе, еш пайда бермейді. Тағы бір мәселе – түс гистограммалары жарық интенсивтілігінің өзгеруі және кванттау қатесі сияқты шулы кедергілерге өте сезімтал. Жоғары өлшемді (интервалдар) түс гистограммалары да проблема тудырады. Кейбір түс гистограммалары жүзден астам өлшемді кеңістікті алады. Ұсынылған шешімдерге түс гистограммаларының қиылысуы, түс тұрақты индекстеуі, жиынтық түс гистограммасы, квадраттық қашықтық және түс коррелограммалары жатады. Индекстеу және классификация үшін гистограммаларды пайдаланудың кемшіліктері болғанымен, нақты уақыт жүйесінде түс пайдаланудың бірнеше артықшылықтары бар. Бірі – түс туралы ақпаратты есептеу басқа инварианттарға қарағанда жылдам. Кейбір жағдайларда түс белгілі орналасқан және сыртқы түрі белгілі нысандарды анықтау үшін тиімді әдіс болуы мүмкін. Түс гистограммасы деректерінің суреттегі нысандардың физикалық қасиеттерімен байланысын зерттеу көрсеткендей, олар нысанның түсі мен жарықтығын ғана емес, сонымен қатар беттің тегістігі мен сурет геометриясын көрсетеді және жарық пен нысан түсі туралы жақсартылған бағалауды ұсынады. Әдетте, еуропалық қашықтық, гистограмма қиылысуы немесе косинус немесе квадраттық қашықтықтар суреттердің ұқсастығын бағалау үшін қолданылады. Бұл мәндердің ешқайсысы екі суреттің ұқсастық деңгейін өздігінен көрсетпейді, олар тек басқа ұқсас мәндермен салыстырғанда ғана пайдалы. Сондықтан, мазмұнға негізделген суреттерді іздеудің барлық практикалық жүзеге асырылымдары дерекқордағы барлық суреттерді есептеуді аяқтауы керек, бұл осы жүзеге асырылымдардың басты кемшілігі. Түсті сурет мазмұнын бейнелеудің тағы бір тәсілі – екі өлшемді түс гистограммасы. Екі өлшемді түс гистограммасы пикселдер жұптарының түстері арасындағы байланысты қарастырады (жарықтандыру компоненті ғана емес). Екі өлшемді түс гистограммасы – екі өлшемді массив. Әр өлшемнің мөлшері түс кванттау кезеңінде қолданылған түстердің санына тең. Бұл массивтер матрица ретінде қарастырылады, олардың әрбір элементі пикселдер жұптарының нормаланған санын сақтайды, әр түс пикселдің көршілесіндегі элементтің индексіне сәйкес келеді. Екі өлшемді түс гистограммаларын салыстыру үшін олардың корреляциясын есептеу ұсынылады, өйткені жоғарыда сипатталғандай құрылған кездейсоқ вектор (басқаша айтқанда, көп өлшемді кездейсоқ мән). Соңғы суреттер жиынтығын құру кезінде суреттер корреляция коэффициентінің азаю ретімен орналастырылуы керек. Корреляция коэффициентін түс гистограммасын салыстыру үшін де қолдануға болады. Корреляция коэффициентімен іздеу нәтижелері басқа өлшемдерге қарағанда жақсы.
The main drawback of histograms for classification is that the representation is dependent on the color of the object being studied, ignoring its shape and texture. Color histograms can potentially be identical for two images with different object content which happens to share color information. Conversely, without spatial or shape information, similar objects of different color may be indistinguishable based solely on color histogram comparisons. There is no way to distinguish a red and white cup from a red and white plate. Put it another way: histogram based algorithms have no concept of a generic 'cup', and a model of a red and white cup is no use when given an otherwise identical blue and white cup. Another problem is that color histograms have high sensitivity to noisy interference such as lighting intensity changes and quantization errors. High dimensionality (bins) color histograms are also another issue. Some color histogram feature spaces often occupy more than one hundred dimensions. Some of the proposed solutions have been color histogram intersection, color constant indexing, cumulative color histogram, quadratic distance, and color correlograms. Although there are drawbacks of using histograms for indexing and classification, using color in a real time system has several advantages. One is that color information is faster to compute compared to other invariants. It has been shown in some cases that color can be an efficient method for identifying objects of known location and appearance. Further research into the relationship between color histogram data to the physical properties of the objects in an image has shown they can represent not only object color and illumination but relate to surface roughness and image geometry and provide an improved estimate of illumination and object color. Usually, Euclidean distance, histogram intersection, or cosine or quadratic distances are used for the calculation of image similarity ratings. Any of these values do not reflect the similarity rate of two images in itself; it is useful only when used in comparison to other similar values. This is the reason that all the practical implementations of content based image retrieval must complete computation of all images from the database, and is the main disadvantage of these implementations. Another approach to representative color image content is two dimensional color histogram. A two dimensional color histogram considers the relation between the pixel pair colors (not only the lighting component). A two dimensional color histogram is a two dimensional array. The size of each dimension is the number of colors that were used in the phase of color quantization. These arrays are treated as matrices, each element of which stores a normalized count of pixel pairs, with each color corresponding to the index of an element in each pixel neighborhood. For comparison of two dimensional color histograms it is suggested calculating their correlation, because constructed as described above, is a random vector (in other words, a multi dimensional random value). While creating a set of final images, the images should be arranged in decreasing order of the correlation coefficient. The correlation coefficient may also be used for color histogram comparison. Retrieval results with correlation coefficient are better than with other metrics.