Correlation between a signal segment and its stretched replica In my application the measurements are affected by temperature and the signal is stretched over time, though preserving relatively similar structure.

I want to find incremental stretching between pairs of consecutive signals. Having a pair of signals, I divide the first into N segments (windows) and for each window I want to find it's shift and new length in the next signal. 

I tried to estimate these incremental shifts with peak detection, but got low accuracy estimates, probably due to the stretching effects on the waveform structure.

In addition, I was advised to try Dynamic Time Warping algorithm, but it manipulates both signals to find the minimal Euclidean distance. In my case I would want only the first segment to be warped until it correlates perfectly with some waveform in the 2nd signal. Couldn't find the way to do so with DTW.
Say you got two similar signals when one of them is stretched and you want to know the straching ratio...
Seems like you can 
1. guess the straching ratio
2. resample the short signal with a resampling ratio equal to your guessed straching ratio.
3. Find the max of the convolution between the signals.
4. Optimize the estimation of the straching ratio using a numerical method.