Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước 
ngày 15 tháng 4 năm 2025 phải 
xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập. Nếu bạn chưa xác minh trước ngày 26 tháng 9 năm 2025, quyền truy cập của bạn có thể bị tạm ngưng.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.Image.not
    
    
      
    
    
      
      Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
    
    
      
      Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
Trả về 0 nếu đầu vào khác 0 và 1 nếu đầu vào bằng 0.
| Cách sử dụng | Giá trị trả về | 
|---|
| Image.not() | Hình ảnh | 
| Đối số | Loại | Thông tin chi tiết | 
|---|
| this: value | Hình ảnh | Hình ảnh mà thao tác được áp dụng. | 
  
  
  Ví dụ
  
    
  
  
    
    
  
  
  
  
    
    
    
      Trình soạn thảo mã (JavaScript)
    
    
  /**
 * Demonstrates the ee.Image.Not method.
 *
 * This example uses positive integers; non-integer and negative
 * values are allowed.
 */
var notZeros = ee.Image(3);  // Define an image where all pixels are not zero.
var zeros = notZeros.not();  // Pixels are not zeros, return zeros.
var ones = zeros.not();  // Pixels are zeros, return ones.
print('zeros:', zeros);
print('ones:', ones);
// Display images to the map; explore values using the Inspector.
var visParams = {min: 0, max: 1};
Map.addLayer(notZeros, visParams, 'notZeros');
Map.addLayer(zeros, visParams, 'zeros');
Map.addLayer(ones, visParams, 'ones');
  
    
  
  
    
  
  
  
  
    
  
    
  Thiết lập Python
  Hãy xem trang 
    Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.
  import ee
import geemap.core as geemap
  
    
    
      Colab (Python)
    
    
  """Demonstrates the ee.Image.Not method.
This example uses positive integers; non-integer and negative
values are allowed.
"""
not_zeros = ee.Image(3)  # Define an image where all pixels are not zero.
zeros = not_zeros.Not()  # Pixels are not zeros, return zeros.
ones = zeros.Not()  # Pixels are zeros, return ones.
display('zeros:', zeros)
display('ones:', ones)
# Sample images at a location and print the results.
loc = ee.Geometry.Point(0, 0)  # Location to sample image values.
display('not_zeros:', not_zeros.sample(loc, 1).first().get('constant'))
display('zeros:', zeros.sample(loc, 1).first().get('constant'))
display('ones:', ones.sample(loc, 1).first().get('constant'))
  
  
  
  
  
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
  Cập nhật lần gần đây nhất: 2025-10-30 UTC.
  
  
  
    
      [null,null,["Cập nhật lần gần đây nhất: 2025-10-30 UTC."],[],[]]