当前位置: 首页>>代码示例>>C++>>正文


C++ remap函数代码示例

本文整理汇总了C++中remap函数的典型用法代码示例。如果您正苦于以下问题:C++ remap函数的具体用法?C++ remap怎么用?C++ remap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了remap函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: cvCreateMat

void FrameProcessor::processStereoFrame(const Mat & frameL, const Mat & frameR, Mat & pointCloud){   

	Mat disparityMap, disparityMapNormalized;
    Mat frameTransposedL, frameTransposedR, frameRemappedL, frameRemappedR, frameGrayscaleL, frameGrayscaleR;     

    Mat rotMatL = cvCreateMat(2,3,CV_32FC1);
    Mat rotMatR = cvCreateMat(2,3,CV_32FC1);
    // Compute rotation matrix
    CvPoint2D32f centerL = cvPoint2D32f( frameL.cols/2, frameL.rows/2 );
    rotMatL = getRotationMatrix2D( centerL, 90, 1 );

    CvPoint2D32f centerR = cvPoint2D32f( frameR.cols/2, frameR.rows/2 );
    rotMatR = getRotationMatrix2D( centerR, 90, 1 );

    warpAffine(frameL, frameTransposedL, rotMatL, frameL.size() );
    warpAffine(frameR, frameTransposedR, rotMatR, frameR.size() );




    //transpose(frameL, frameTransposedL);
    //transpose(frameR, frameTransposedR);


    remap(frameTransposedL, frameRemappedL, rmap[0][0], rmap[0][1], CV_INTER_LINEAR);
    remap(frameTransposedR, frameRemappedR, rmap[1][0], rmap[1][1], CV_INTER_LINEAR);

    //imshow("LiveFeedL",frameTransposedL);
   //imshow("LiveFeedR",frameTransposedR);

    cvtColor(frameRemappedL, frameGrayscaleL, CV_RGB2GRAY);
    cvtColor(frameRemappedR, frameGrayscaleR, CV_RGB2GRAY);


    BlockMatcher( frameGrayscaleL, frameGrayscaleR, disparityMap, CV_32F);
    normalize(disparityMap, disparityMapNormalized, 0, 255, CV_MINMAX, CV_8U);

    imshow("Disparity", disparityMapNormalized);

    reprojectImageTo3D( disparityMap, pointCloud, Q, false);
}
开发者ID:evil0sheep,项目名称:stereotouch,代码行数:41,代码来源:FrameProcessor.cpp

示例2: main

int main(int argc, char** argv) {
  ros::init(argc, argv, "image_undistort_node");
  nodelet::Loader nodelet;
  nodelet::M_string remap(ros::names::getRemappings());
  nodelet::V_string nargv;
  std::string nodelet_name = ros::this_node::getName();
  ROS_INFO_STREAM("Started " << nodelet_name << " nodelet.");
  nodelet.load(nodelet_name, "image_undistort/ImageUndistortNodelet", remap,
               nargv);
  ros::spin();
  return 0;
}
开发者ID:ethz-asl,项目名称:image_undistort,代码行数:12,代码来源:image_undistort_node.cpp

示例3: paddr

vaddr_t
VmMap::remap(paddr_t paddr, size_t siz)
{
    //OUTDEBUG("[ VmMap ]");
    vaddr_t vaddr = this->getFreeVAddr(paddr, siz);
    cout << kernel::Console::HEX
         << "[ VmMap ] VmMap::remap() remapping paddr(0x" << (int) (paddr)
         << ") vaddr(0x" << (int) (vaddr) << ") SIZ[" << kernel::Console::DEC
         << (int) (siz) << "]\n";
    vaddr = remap(paddr, vaddr, siz);
    return vaddr;
}
开发者ID:GravisZro,项目名称:kiddie,代码行数:12,代码来源:VmMap.cpp

示例4: remap

void blockOopClass::remap(nmethod* nm, frame* fr) {
  // the receiver's enclosing nmethod has been recompiled; update the
  // map and scope pointer
  // frame* home = scope();   // caller ensures liveness
  // Map* oldMap = map();
  Map* newMap = nm->blockMapFor(this);
  // assert(oldMap != newMap, "maps should be different");
  // can be equal for receiver block, or could have been remapped in
  // one of the sending vframes
  if (!newMap) ShouldNotReachHere(); // should have found new block map
  remap(newMap, fr);
}
开发者ID:ardeujho,项目名称:self,代码行数:12,代码来源:blockOop.cpp

示例5: getColour

static byte getColour(byte cpuUsage, byte inMin, byte inMax, byte outMin, byte outMax)
{
	return remap(
		limitVal(
			cpuUsage,
			inMin,
			inMax),
		inMin,
		inMax,
		outMin,
		outMax
	);
}
开发者ID:Testudoed,项目名称:AVR-USB-RGB-LED-Controller,代码行数:13,代码来源:backend.c

示例6: indexMap

ivector stringIndexer::
indexMap(stringIndexer & A) {
  int i;
  ivector remap(size);
  for (i = 0; i < size; i++) {
    if (A.htab.count(unh[i])) {
      remap[i] = A.htab[unh[i]];
    } else {
      remap[i] = 0;
    }
  }
  return remap;
}
开发者ID:codeaudit,项目名称:BIDMach,代码行数:13,代码来源:tparse.cpp

示例7: ptr

    bool
    ConsumerToConsumer::call_remap_with_VK_PSEUDO_KEY(EventType eventType)
    {
      Params_KeyboardSpecialEventCallback::auto_ptr ptr(Params_KeyboardSpecialEventCallback::alloc(eventType,
                                                                                                   FlagStatus::makeFlags(),
                                                                                                   ConsumerKeyCode::VK_PSEUDO_KEY,
                                                                                                   false));
      if (! ptr) return false;
      Params_KeyboardSpecialEventCallback& params = *ptr;

      RemapConsumerParams rp(params);
      return remap(rp);
    }
开发者ID:Bilalh,项目名称:KeyRemap4MacBook,代码行数:13,代码来源:ConsumerToConsumer.cpp

示例8: integral

 Probability DefaultDensityStructure::survivalProbabilityImpl(Time t) const {
     static GaussChebyshevIntegration integral(48);
     // this stores the address of the method to integrate (so that
     // we don't have to insert its full expression inside the
     // integral below--it's long enough already)
     Real (DefaultDensityStructure::*f)(Time) const =
         &DefaultDensityStructure::defaultDensityImpl;
     // the Gauss-Chebyshev quadratures integrate over [-1,1],
     // hence the remapping (and the Jacobian term t/2)
     Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
     //QL_ENSURE(P >= 0.0, "negative survival probability");
     return std::max<Real>(P, 0.0);
 }
开发者ID:21hub,项目名称:QuantLib,代码行数:13,代码来源:defaultdensitystructure.cpp

示例9: remap

/*
 * Remaps a property value from 'form' to 'to'. This is done for all
 * logical cores.
 */
static void
remap(lcore_t *lc,
      unsigned from,
      unsigned to,
      getter_fn get,
      setter_fn set)
{
	if (lc) {
		if (get(lc) == from)
			set(lc, to);
		remap(lc->next, from, to, get, set);
	}
}
开发者ID:hemantagr,项目名称:pktgen-dpdk,代码行数:17,代码来源:wr_coremap.c

示例10: __strlen

size_t __strlen(char* c) {
    size_t len = 0;
    do {
        if (len % 0x1000 == 0) {
            c = (char*)remap((puint_t)c);
        }
        if (*c++ == '\0')
            break;
        else
            ++len;
    } while (true);
    return len;
}
开发者ID:Enerccio,项目名称:Cthulhu-OS,代码行数:13,代码来源:paging.c

示例11: __CONTEXT

recChannel_t::~recChannel_t(void)
{
     __CONTEXT("recChannel_t::~recChannel_t");

	IBaseFilter * pFilter = NULL;
	if (camInfo->getKind() == TEST) 
	{
		looper->EndThread();
	}
	
	unmap();
	camList->lookUp(sourceId)->setFree(true);
	 
	pControl->Stop();
	
    looper->EndThread();
 
    delete looper;
    delete pSender;

    remap();
	
	int hr = 0;

	// Enumerate the filters in the graph.
	IEnumFilters *pEnum = NULL;
	hr = pGraph->EnumFilters(&pEnum);
	if (SUCCEEDED(hr))
	{
		IBaseFilter *pFilter = NULL;
		while (S_OK == pEnum->Next(1, &pFilter, NULL))
		{
				pGraph->RemoveFilter(pFilter);
				pFilter->Release();
				pEnum->Reset();
		}
		pEnum->Release();
	}
	pControl->Release();
	pEvent->Release();
	pGraph->Release();
	
	channelList->remove(getId());
	rtpSession->deleteSender (getId(), "Channel deleted");
#ifdef _WINDOWS
    EndThread();
    TerminateThread(hThread,0); 
#endif
    

}
开发者ID:cchatterj,项目名称:isabel,代码行数:51,代码来源:recchanel.cpp

示例12: ptr

    bool
    KeyToKey::call_remap_with_VK_PSEUDO_KEY(EventType eventType)
    {
      Params_KeyboardEventCallBack::auto_ptr ptr(Params_KeyboardEventCallBack::alloc(eventType,
                                                                                     FlagStatus::makeFlags(),
                                                                                     KeyCode::VK_PSEUDO_KEY,
                                                                                     CommonData::getcurrent_keyboardType(),
                                                                                     false));
      if (! ptr) return false;
      Params_KeyboardEventCallBack& params = *ptr;

      RemapParams rp(params);
      return remap(rp);
    }
开发者ID:Bilalh,项目名称:KeyRemap4MacBook,代码行数:14,代码来源:KeyToKey.cpp

示例13: main

/** Main node entry point. */
int main(int argc, char **argv)
{
  ros::init(argc, argv, "camera1394_node");

  nodelet::Loader nodelet;
  nodelet::M_string remap(ros::names::getRemappings());
  nodelet::V_string nargv;

  nodelet.load("camera1394_node", "camera1394/driver", remap, nargv);

  ros::spin();

  return 0;
}
开发者ID:silverbullet1,项目名称:bbauv,代码行数:15,代码来源:node.cpp

示例14: main

int main(int argc, char **argv)
{
  ros::init(argc, argv, "localizer_node");

  nodelet::Loader nodelet;
  nodelet::M_string remap(ros::names::getRemappings());
  nodelet::V_string nargv;

  nodelet.load("localizer", "localizer/LocalizerNodelet", remap, nargv);

  ros::spin();

  return 0;
}
开发者ID:DenisBavcar,项目名称:vicos_ros,代码行数:14,代码来源:localizer_node.cpp

示例15: main

int main(int argc, char** argv) {
    ros::init(argc, argv, "zed_wrapper_node");

    nodelet::Loader nodelet;
    nodelet::M_string remap(ros::names::getRemappings());
    nodelet::V_string nargv;
    nodelet.load(ros::this_node::getName(),
            "zed_wrapper/ZEDWrapperNodelet",
            remap, nargv);

    ros::spin();

    return 0;
}
开发者ID:DapengChalmers,项目名称:ZSLAM_TX2,代码行数:14,代码来源:zed_wrapper_node.cpp


注:本文中的remap函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。