Dodanie metody wyznaczającej histogram
This commit is contained in:
parent
55cfe891ee
commit
845b6fe40c
@ -24,6 +24,20 @@ Histogram::~Histogram()
|
|||||||
|
|
||||||
void Histogram::generate(QImage* image)
|
void Histogram::generate(QImage* image)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
qDebug() << Q_FUNC_INFO << "Not implemented yet!";
|
||||||
|
for(int i = 0 ; i < image->height(); i++){
|
||||||
|
for(int j = 0 ; j < image->width() ; j++){
|
||||||
|
QColor *clrCurrent = new QColor( image->pixel(i,j) );
|
||||||
|
R->insert(clrCurrent->red(),R->value(clrCurrent->red())+1);
|
||||||
|
G->insert(clrCurrent->green(),R->value(clrCurrent->green())+1);
|
||||||
|
B->insert(clrCurrent->blue(),R->value(clrCurrent->blue())+1);
|
||||||
|
L->insert(clrCurrent->alpha(),R->value(clrCurrent->alpha())+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
qDebug() << Q_FUNC_INFO << "Not implemented yet!";
|
qDebug() << Q_FUNC_INFO << "Not implemented yet!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user