Exemplo n.º 1
0
def gendata(sarplat, targets):

    Sr, ta, tr = iprs.tgs2rawdata(sarplat, targets, verbose=True)

    # visualize
    iprs.show_amplitude_phase(Sr)

    # do RD imaging
    # img, ta, tr = imcls.RangeDoppler(Sr, sarplat)
    # vis.show_img(img)

    img, ta, tr = iprs.omega_k(Sr, sarplat, verbose=True)

    sardata = iprs.SarData()

    sardata.rawdata = Sr
    sardata.image = img
    sardata.name = " "

    return sardata
Exemplo n.º 2
0
bgv = 0  # bg color : white

targets = iprs.img2tgs(grayimg, bg=bgv, noise=None)

imgshape = grayimg.shape
SrI = iprs.show_targets(targets, imgshape, outfile)

Sr, targets = iprs.img2rawdata(sarplat,
                               grayimg,
                               bg=bgv,
                               noise=None,
                               verbose=True)

# visualize
iprs.show_amplitude_phase(Sr)

if imagingMethod is 'RangeDoppler':
    # do RD imaging
    Sr_img, ta, tr = iprs.range_doppler(Sr, sarplat, verbose=False)
elif imagingMethod is 'OmegaK':
    Sr_img, ta, tr = iprs.omega_k(Sr, sarplat, verbose=False)
elif imagingMethod is 'ChirpScaling':
    Sr_img = iprs.chirp_scaling(Sr, sarplat, verbose=False)

# axismod = 'Image'
# axismod = 'SceneAbsolute'
axismod = 'SceneRelative'
title = 'Reconstructed Image using ' + imagingMethod
# title = 'Reconstructed Image using omega-k'
outfile = outfilename_prefix + "_" + imagingMethod + '.png'