Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kn65op committed Aug 1, 2013
1 parent 56e7d36 commit 9d80f7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OpenCLpp
Submodule OpenCLpp updated 1 files
+7 −44 kernels/detectors.cl
7 changes: 4 additions & 3 deletions ScaleSpace/ScaleSpaceImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <fstream>

#define DEBUG_SS
//#define DEBUG_SS
#ifdef DEBUG_SS
#define DEBUG_SS_TWO_OUTPUT
#endif
Expand Down Expand Up @@ -72,7 +72,7 @@ void ScaleSpaceImage::setOriginalImage(cv::Mat oimage)
}*/
}

void ScaleSpaceImage::show(std::string fn)//TODO: not only one image
void ScaleSpaceImage::show(std::string fn)
{
static int image_nr = 0;
cv::Mat tmp(height, width, image[0].type());
Expand All @@ -90,7 +90,8 @@ void ScaleSpaceImage::show(std::string fn)//TODO: not only one image
{
throw ScaleSpaceImageException("Not supported output image type");
}
cv::imwrite("original.bmp", tmp2);
cv::imwrite("original.bmp", original_image);
//cv::imwrite("original.bmp", tmp2);

for (unsigned int i = 0; i < nr_scales; ++i)
{
Expand Down
7 changes: 5 additions & 2 deletions ScaleSpace/ScaleSpaceOpenCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void ScaleSpaceOpenCL::prepare(ScaleSpaceSourceImageType si_type)
#ifdef INFO_SS
std::cout << "Mode: blobs\n";
#endif
post_processing = new OpenCLFindMaxin3DImage();
break;
case ScaleSpaceMode::Corners:
recognizer = new OpenCLCornerDetector();
Expand Down Expand Up @@ -245,13 +246,13 @@ void ScaleSpaceOpenCL::processImage(cv::Mat& input, ScaleSpaceImage& output)
#endif
s->processImage(input.data, output.getDataForScale(i)); //not copy original image data
void * additional_output = s->getLastAlgorithmAdditionalOutput();
#ifdef INFO_SS
#ifdef DEBUG_SS
std::cout << "additional_output = " << additional_output << "\n";
#endif
if (additional_output)
{
#ifdef INFO_SS
std::cout << "storing additional output\n";
std::cout << "Storing additional output\n";
#endif
memcpy(output.getDataForScale(i, 1), additional_output, output.getOneImageSize());
}
Expand Down Expand Up @@ -282,6 +283,8 @@ void ScaleSpaceOpenCL::processImage(cv::Mat& input, ScaleSpaceImage& output)
case ScaleSpaceMode::Edges:
break;
case ScaleSpaceMode::Blobs:
output.show(outp, sigmas);
outp = outp * 255 / nr_scales;
break;
case ScaleSpaceMode::Corners:
#ifdef DEBUG_SS
Expand Down

0 comments on commit 9d80f7b

Please sign in to comment.