Exemplo n.º 1
0
void IconEditor::mouseMoveEvent(QMouseEvent *event)
{
    if (event->buttons() & Qt::LeftButton) {
        setImagePixel(event->pos(), true);
    } else if (event->buttons() & Qt::RightButton) {
        setImagePixel(event->pos(), false);
    }
}
Exemplo n.º 2
0
//write the hough transform to an image
void HoughGrid::sendHoughToImage(char* filename){
  PPMwriter* w = new PPMwriter();
  unsigned short curVal;
  
  w->create_image(filename, RADIUS_SIZE, THETA_SIZE);
  
  for (int i=0; i<THETA_SIZE; i++){
    for (int j=0; j<RADIUS_SIZE; j++){
      curVal = this->map[i*RADIUS_SIZE + j];
      setImagePixel(w, curVal);
    }
  }
  
  w->output_image();
  delete w;
}