I am new to image processing and coding and I am having trouble applying a lowpass and highpass filter to a NAIP image. I have practiced with Landsat 8 images with a successful output but I am getting a white/ blank image for the NAIP image. I tried searching for more GEE documentation on this matter but found very limited information.

Here is a sample of my code:

var image=ee.Image('USDA/NAIP/DOQQ/m_3110613_se_13_060_20190226_20190504').select('R','G','B');
// Region of interest for section with buffer of 2.5 km
var roi = ee.Geometry.Point(-106.4126, 31.7835).buffer(2500);     

Map.setCenter(-106.4126, 31.7835,15);
Map.addLayer(image,{},'RGB NAIP Image: Q3');

// lowpass filter parameters
// Define the low-pass kernel.
// This kernel creates a 7X7 square kernel.
var lowpass = ee.Kernel.square({radius: 7, units: 'pixels', normalize: true});

//Smooth the image by convolving with the low-pass kernel.
var smooth = image.convolve(lowpass);

//Display the filtered image
Map.addLayer(smooth, {bands:['R','G','B'], max: 0.5}, 'smoothed');

1 Answer 1


Specifically set the min and max value of the bands when visualizing your image. See here for an overview of the functionallity of Map.addLayer(). An example for you 8-bit (0-255 values) would be:

Map.addLayer(image,{min: 0, max: 255},'RGB NAIP Image: Q3');   
//Display the filtered image
Map.addLayer(smooth, {bands:['R','G','B'], min: 0, max: 255}, 'smoothed');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.