ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অ্যাক্সেস বজায় রাখার জন্য
অবাণিজ্যিক যোগ্যতা যাচাই করতে হবে। আপনি যদি 26 সেপ্টেম্বর, 2025 এর মধ্যে যাচাই না করে থাকেন তবে আপনার অ্যাক্সেস হোল্ডে রাখা হতে পারে।
ee.Algorithms.Image.Segmentation.SNIC
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
SNIC ভিত্তিক সুপারপিক্সেল ক্লাস্টারিং (সিম্পল নন-ইটারেটিভ ক্লাস্টারিং)। প্রতিটি ইনপুট ব্যান্ডের জন্য ক্লাস্টার আইডির একটি ব্যান্ড এবং প্রতি-ক্লাস্টার গড় আউটপুট করে। যদি 'বীজ' ইমেজ ইনপুট হিসাবে প্রদান করা না হয়, তাহলে আউটপুটে একটি 'বীজ' ব্যান্ড থাকবে যাতে উৎপন্ন বীজের অবস্থান থাকে। দেখুন: Achanta, Radhakrishna and Susstrunk, Sabine, 'Superpixels and Polygons using Simple Non-Iterative Clustering', CVPR, 2017।
| ব্যবহার | রিটার্নস | ee.Algorithms.Image.Segmentation.SNIC(image, size , compactness , connectivity , neighborhoodSize , seeds ) | ছবি |
| যুক্তি | টাইপ | বিস্তারিত | image | ছবি | ক্লাস্টারিংয়ের জন্য ইনপুট চিত্র। |
size | পূর্ণসংখ্যা, ডিফল্ট: 5 | সুপারপিক্সেল বীজ অবস্থানের ব্যবধান, পিক্সেলে। যদি 'বীজ' চিত্র প্রদান করা হয়, কোন গ্রিড উত্পাদিত হয় না। |
compactness | ফ্লোট, ডিফল্ট: 1 | কম্প্যাক্টনেস ফ্যাক্টর। বড় মানগুলি ক্লাস্টারগুলিকে আরও কমপ্যাক্ট (বর্গক্ষেত্র) করে তোলে। এটিকে 0 তে সেট করা স্থানিক দূরত্ব ওজন অক্ষম করে। |
connectivity | পূর্ণসংখ্যা, ডিফল্ট: 8 | সংযোগ। হয় 4 বা 8। |
neighborhoodSize | পূর্ণসংখ্যা, ডিফল্ট: নাল | টাইল আশেপাশের আকার (টাইল সীমানা শিল্পকর্ম এড়াতে)। 2 * আকারে ডিফল্ট। |
seeds | ছবি, ডিফল্ট: নাল | যদি প্রদান করা হয়, কোন অ-শূন্য মূল্যের পিক্সেল বীজ অবস্থান হিসাবে ব্যবহার করা হয়। স্পর্শ করা পিক্সেলগুলি ('সংযোগ' দ্বারা নির্দিষ্ট করা হয়েছে) একই ক্লাস্টারের অন্তর্গত বলে মনে করা হয়। |
উদাহরণ
কোড এডিটর (জাভাস্ক্রিপ্ট)
// Note that the compactness and size parameters can have a significant impact
// on the result. They must be adjusted to meet image-specific characteristics
// and patterns, typically through trial. Pixel scale (map zoom level) is also
// important to consider. When exploring interactively through map tile
// visualization, the segmentation result it dependent on zoom level. If you
// need to evaluate the result at a specific scale, call .reproject() on the
// result, but do so with caution because it overrides the default scaling
// behavior that makes tile computation fast and efficient.
// Load a NAIP image for a neighborhood in Las Vegas.
var naip = ee.Image('USDA/NAIP/DOQQ/m_3611554_sw_11_1_20170613');
// Apply the SNIC algorithm to the image.
var snic = ee.Algorithms.Image.Segmentation.SNIC({
image: naip,
size: 30,
compactness: 0.1,
connectivity: 8,
});
// Display the original NAIP image as RGB.
// Lock map zoom to maintain the desired scale of the segmentation computation.
Map.setLocked(false, 18, 18);
Map.setCenter(-115.32053, 36.182016, 18);
Map.addLayer(naip, null, 'NAIP RGB');
// Display the clusters.
Map.addLayer(snic.randomVisualizer(), null, 'Clusters');
// Display the RGB cluster means.
var visParams = {
bands: ['R_mean', 'G_mean', 'B_mean'],
min: 0,
max: 255
};
Map.addLayer(snic, visParams, 'RGB cluster means'); পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
# Note that the compactness and size parameters can have a significant impact
# on the result. They must be adjusted to meet image-specific characteristics
# and patterns, typically through trial. Pixel scale (map zoom level) is also
# important to consider. When exploring interactively through map tile
# visualization, the segmentation result it dependent on zoom level. If you
# need to evaluate the result at a specific scale, call .reproject() on the
# result, but do so with caution because it overrides the default scaling
# behavior that makes tile computation fast and efficient.
# Load a NAIP image for a neighborhood in Las Vegas.
naip = ee.Image('USDA/NAIP/DOQQ/m_3611554_sw_11_1_20170613')
# Apply the SNIC algorithm to the image.
snic = ee.Algorithms.Image.Segmentation.SNIC(
image=naip, size=30, compactness=0.1, connectivity=8
)
# Display the original NAIP image as RGB.
m = geemap.Map()
m.set_center(-115.32053, 36.182016, 18)
m.add_layer(naip, None, 'NAIP RGB')
# Display the clusters.
m.add_layer(snic.randomVisualizer(), None, 'Clusters')
# Display the RGB cluster means.
vis_params = {'bands': ['R_mean', 'G_mean', 'B_mean'], 'min': 0, 'max': 255}
m.add_layer(snic, vis_params, 'RGB cluster means')
m
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],["SNIC clustering segments an image into superpixels, outputting cluster IDs and per-cluster averages for each input band. Key parameters include `size` (seed spacing), `compactness` (cluster shape), and `connectivity`. A user can provide `seeds` to define seed locations; otherwise, they are generated. The output `Image` includes cluster IDs, band averages, and optionally generated seed locations. Adjusting `size` and `compactness` is crucial for optimal results, which are also affected by pixel scale.\n"]]