Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Алгоритмы > texture direction/scale histogram


Автор: vilix 25.7.2012, 04:40
Здравствуйте уважаемые программисты, я тут делал простенькую курсовую по сравнению изображений примитивным способом, сравнением их гистограмм, изначально сравнивал три гистограммы R G B
Но вот нашел на stackoverflow, что можно сравнивать еще две доп. гистограммы : texture direction histogram,  texture scale histogram. я не понял толком как их вычислить, прошу в этом помощи.

текст с стэка на англ:
 
Цитата

For the texture direction histogram, we started by performing edge detection on the image. Each edge point has a normal vector pointing in the direction perpendicular to the edge. We quantized the normal vector's angle into one of 6 buckets between 0 and PI (since edges have 180-degree symmetry, we converted angles between -PI and 0 to be between 0 and PI). After tallying up the number of edge points in each direction, we have an un-normalized histogram representing texture direction, which we normalized by dividing each bucket by the total number of edge points in the image.

To compute the texture scale histogram, for each edge point, we measured the distance to the next-closest edge point with the same direction. For example, if edge point A has a direction of 45 degrees, the algorithm walks in that direction until it finds another edge point with a direction of 45 degrees (or within a reasonable deviation). After computing this distance for each edge point, we dump those values into a histogram and normalize it by dividing by the total number of edge points.



мои запутанные мысли:

С первой я кажется немного понял что делать, но все равно путаюсь, как я понял сначала надо применить оператор Кэнни чтобы найти крайние точки, но вот как потом найти направление текстуры? оно равно направлению градиента? если да, то может только оператор Собеля применить?

А с texture scale histogram не понимаю как это именно в коде отобразить, что есть ближайшая крайняя точка,  как идти по этому направлению? перебирать что ли ведерки direction histogram.. 
возможно пойму все как будет готова direction histogram

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)