This should put you on the right path to getting a working solution. The important part is the Resolve-Path cmdlet which takes a -Relative parameter: http://technet.microsoft.com/en-us/library/hh849858.aspx. new-Item -Force merely tell it to create a folder structure if required.
# $OldRoot = 'Top-level of old files'
# $DestRoot = 'Top-level of destination'
# Go to old root so relative paths are correct
Set-Location $OldRoot
# Get all the images, then for each one...
Get-ChildItem -Recurse -Include "*.jpeg", "*.jpg" |
ForEach-Object {
# Save full name to avoid issues later
$Source = $_.FullName
# Construct destination filename using relative path and destination root
$Destination = '{0}\{1}' -f $DestRoot, (Resolve-Path -Relative -Path:$Source).TrimStart('.\')
# If new destination doesn't exist, create it
If(-Not (Test-Path ($DestDir = Split-Path -Parent -Path:$Destination))) {
New-Item -Type:Directory -Path:$DestDir -Force -Verbose
}
# Copy old item to new destination
Copy-Item -Path:$Source -Destination:$Destination -Verbose
}