Questions tagged [remap]

257 questions
1
vote
1 answer

How to use :s with regex and filename in vim

Wanting to create a function which will add me python logger at each function define I came up on macro: nnoremap L :%s/\(\s*\)def \(\w\S*\)\(self.*\):/\0\r\1\tlogging.info(\'\2)\')/g It works, but I need eddited filename too, so I…
pholat
  • 467
  • 5
  • 20
1
vote
2 answers

Enlarge matrix repeating its values

I need to enlarge a matrix A to a matrix B with size n times the size of A. The values must be repeated, eg: A size 2x3, n = 3, leads to B size 6x9: Sample values: A = 1 2 3 4 5 6 Results with: B = 1 1 1 2 2 2 3 3 3 1 1 1 2 2 2 3 3 3 …
Pedro77
  • 5,176
  • 7
  • 61
  • 91
1
vote
0 answers

vim remap n not working colemak

So, i'm a colemak user, and I'm trying vim for the first time. As a colemak user, I'm using colemak.vim, so my movement isn't on k,h,l,j, but u,n,i,e Right now, I'm trying to remap the CTRL-w(movement): Change focus to the window in the direction…
1
vote
0 answers

Remapping CapsLock+IJKY as cursor keys in VT without X running in Debian

On a GNU Debian Jessie system working under X, I successfully remapped a CapsLock key to function as Mode_switch in a file that is used by xmodmap. Now with some extra remappings, when the CapsLock is pressed I'm able to use the IJKY keys as cursor…
Arua
  • 21
  • 3
1
vote
0 answers

MATLAB inter2p and OpenCV remap gives different result

I am translating a MATLAB program to Python program. In the MATLAB program I have the following line. [x,y]=meshgrid(1:width,1:height); tImg(:,:,1) = interp2(x,y,Img(:,:,1),single(Tx),single(Ty),'cubic'); So I translated it to the following Python…
Li Siyao
  • 83
  • 9
1
vote
1 answer

How does the remap function in OpenCV for undistorting images work?

for debugging purposes I tried to reimplement the remap function of OpenCV. Without considering interpolation, it should look something like this: for( int j = 0; j < height; j++ ) { for( int i = 0; i < width; i++ ) { …
1
vote
0 answers

undistort image before estimating pose using solvePnP

I have to estimate the pose of the camera using a known marker. The camera is calibrated and I have all the calibration coefficients. The current version of the algorithm extracts 4 co-planar points from the frame and uses them to estimate the pose…
Alexis
  • 576
  • 1
  • 10
  • 29
1
vote
1 answer

Remapping numpy arrarys to dictionary

I want to remap a numpy array according to a dictionary. Let us assume I have a numpy array with N rows and 3 columns. Now I want to remap the values according to its indices which are written in tuples in a dictionary. This works fine: import numpy…
pallago
  • 419
  • 1
  • 4
  • 12
1
vote
0 answers

Can I remap port numbers for cloud compute instances such as from port 502 to 1502

I have some IoT devices that uses modbustcp on port 502. I have a communications solution running on windows that I would like to use on some google compute instances. Since ports below 1024 is nogo unless being elevated (sudo) then I have been…
Laro88
  • 11
  • 3
1
vote
1 answer

Karabiner help key remapping

I broke my "j" button on my macbook pro, any idea how I can replace the j with right-command + "k"? I tried a couple of different things but could not get it to work. I would appreciate any help. Thank you!
user1772859
  • 51
  • 1
  • 6
1
vote
1 answer

Remapping commands in gvim

I would like to remap the command gf to gf How do I do that ? I tried :map gf gf This is not working. How do I group gf into a single action ?
Jean
  • 21,665
  • 24
  • 69
  • 119
1
vote
6 answers

Favorite Visual Studio keyboard remappings?

Stack Overflow has covered favorite short-cuts and add-ins, optimizations and preferences -- great topics all. If this one has been covered, I can't find it -- so thanks in advance for the link. What are your favorite Visual Studio keyboard…
hoytster
  • 247
  • 4
  • 15
1
vote
1 answer

AutoHotKey change keys if variable is true

I'm new to AutoHotKey and am trying to create a script to let me use my Roku's Bluetooth remote with my PC. The issue with the remote is that all the keys are weird. What I would like is so that when I press x and y at the same time, all the…
quadrplax
  • 25
  • 5
1
vote
1 answer

Vim EasyMotion: Insert mode after movement?

I have remapped the EasyMotion commands ,,w and ,,b with the following: imap ,w w imap ,b b This way i'm able to use EasyMotion in Insert mode and navigate quickly without entering Normal mode. Though,…
1
vote
2 answers

opencv remap to a different size image

Can I use remap to map one image into another image with a different size? for example assume that I want to map all pixels from image one (with size a,b) that x+y<100 into a new image and the size of new image should be 2a+b, 2b+a.
mans
  • 17,104
  • 45
  • 172
  • 321