Relative Content

Tag Archive for javascriptarrayshistogrammatchingsatellite-image

Google Earth Engine: error “Invalid type. Expected type: Number” trying to compute a Number while performing histogram matching on satellite images

I am working on satellite imagery on Google Earth Engine (JavaScript), and I’m experiencing some issues while I try to perform histogram matching on two images from two different time periods.
In particular, when I retrieve the histograms for the two images (different histograms for different spectral bands) I see that the histograms of one image are shorter than the histograms of the other image. So, I tried to compute the minimum length between the histograms from the two images to slice the longest histogram and match the length of the shortest one.
I admit I exploited chatGPT to get help while developing the script (I am a beginner in JavaScript), as the only examples provided by Google Earth Engine tutorials on this subject are in Python and I needed to translate in JavaScript (https://developers.google.com/earth-engine/tutorials/community/histogram-matching).

Google Earth Engine: error “Invalid type. Expected type: Number” trying to compute a Number while performing histogram matching on satellite images

I am working on satellite imagery on Google Earth Engine (JavaScript), and I’m experiencing some issues while I try to perform histogram matching on two images from two different time periods.
In particular, when I retrieve the histograms for the two images (different histograms for different spectral bands) I see that the histograms of one image are shorter than the histograms of the other image. So, I tried to compute the minimum length between the histograms from the two images to slice the longest histogram and match the length of the shortest one.
I admit I exploited chatGPT to get help while developing the script (I am a beginner in JavaScript), as the only examples provided by Google Earth Engine tutorials on this subject are in Python and I needed to translate in JavaScript (https://developers.google.com/earth-engine/tutorials/community/histogram-matching).