本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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);
}
示例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
);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
}
示例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;
}
示例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
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}