pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by Willow on Thu 14th Feb 21:24
View followups from Willow | download | new post

  1. //Convert the message into a bitstream, storing each bit in a vector.
  2.         std::string message = argv[1];
  3.         std::vector<char> *bitPtr = new std::vector<char>;
  4.         convertMessage(message, bitPtr);
  5.         std::vector<char>::iterator it = bitPtr->begin();
  7.         const int gridYStep = sourceImage->height/GRID_ROWS;
  8.         const int gridXStep = sourceImage->width/GRID_COLS;
  9.         char bit;
  11.         //Define each grid square with dimensions gridXStep x GridYStep pixel.
  12.         //For each square we read in the next bit and set the angle data
  13.         //When the end of the vector is reached painting happens normally
  14.         //(Could change to default at '0'?)
  16.         for(int y(0); y < sourceImage->height; y+= gridYStep)
  17.                 for(int x(0); x < sourceImage->width; x+= gridXStep)
  18.                 {
  19.                         cv::Rect gridSquare(x, y, gridXStep, gridYStep);
  20.                         if (it!=bitPtr->end())
  21.                         {
  22.                                 bit = *it;
  23.                                 setGridAngles(orientinfo, sourceImage, *it, gridSquare);
  24.                                 it++;
  25.                         }
  26.                         else
  27.                                 setGridAngles(orientinfo, sourceImage, '0', gridSquare);
  28.                 }

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@

Remember my settings