[openrtm-commit:00050] r20 - trunk/ImageProcessing/opencv/components/CameraViewer
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 5月 12日 (木) 17:05:46 JST
Author: kurihara
Date: 2011-05-12 17:05:46 +0900 (Thu, 12 May 2011)
New Revision: 20
Modified:
trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.cpp
trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.h
Log:
The bug about the resize handling of the image has been fixed.
Modified: trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.cpp
===================================================================
--- trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.cpp 2011-05-12 08:01:52 UTC (rev 19)
+++ trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.cpp 2011-05-12 08:05:46 UTC (rev 20)
@@ -114,7 +114,6 @@
RTC::ReturnCode_t CameraViewer::onActivated(RTC::UniqueId ec_id)
{
- m_img = NULL;
m_orig_img = NULL;
m_in_height = 0;
@@ -130,9 +129,6 @@
RTC::ReturnCode_t CameraViewer::onDeactivated(RTC::UniqueId ec_id)
{
- if(m_img != NULL)
- cvReleaseImage(&m_img);
-
if(m_orig_img != NULL)
cvReleaseImage(&m_orig_img);
@@ -170,21 +166,7 @@
return RTC::RTC_OK;
}
- // oÍTCYÍRtBO[VÌð©¤
- if(m_img == NULL || isCFGChanged())
- {
- printf("[onExecute] CFG is changed!\n");
-
- m_nOldHeight = m_img_height;
- m_nOldWidth = m_img_width;
-
- if(m_img != NULL)
- cvReleaseImage(&m_img);
-
- // `lÍRÅÅè
- m_img = cvCreateImage(cvSize(m_img_width, m_img_height), IPL_DEPTH_8U, 3);
- }
-
+ */
// TCYªÏíÁ½Æ«¾¯Ä¶¬·é
if(m_in_height != (int)m_in.height || m_in_width != (int)m_in.width)
{
@@ -203,14 +185,12 @@
// f[^Rs[
memcpy(m_orig_img->imageData,(void *)&(m_in.pixels[0]), m_in.pixels.length());
- // üÍfðoÍTCYÉí¹ÄRs[
- cvResize( m_orig_img, m_img, CV_INTER_LINEAR );
-
+
//æ\¦
#if (!defined WIN32) || (!defined WIN64)
cvStartWindowThread();
#endif
- cvShowImage("CaptureImage", m_img);
+ cvShowImage("CaptureImage", m_orig_img);
if (count > 100)
{
Modified: trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.h
===================================================================
--- trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.h 2011-05-12 08:01:52 UTC (rev 19)
+++ trunk/ImageProcessing/opencv/components/CameraViewer/CameraViewer.h 2011-05-12 08:05:46 UTC (rev 20)
@@ -275,7 +275,6 @@
private:
int dummy;
- IplImage* m_img;
IplImage* m_orig_img;
int m_img_height; // CFG : Image-Height
openrtm-commit メーリングリストの案内