ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ee.Kernel.compass
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি 3x3 প্রিউইটের কম্পাস এজ-ডিটেকশন কার্নেল তৈরি করে।
ব্যবহার | রিটার্নস | ee.Kernel.compass( magnitude , normalize ) | কার্নেল |
যুক্তি | টাইপ | বিস্তারিত | magnitude | ফ্লোট, ডিফল্ট: 1 | এই পরিমাণ দ্বারা প্রতিটি মান স্কেল. |
normalize | বুলিয়ান, ডিফল্ট: মিথ্যা | কার্নেলের মানগুলিকে 1 এ যোগ করার জন্য স্বাভাবিক করুন। |
উদাহরণ
কোড এডিটর (জাভাস্ক্রিপ্ট)
print('A Prewitt compass kernel', ee.Kernel.compass());
/**
* Output weights matrix
*
* [1, 1, -1]
* [1, -2, -1]
* [1, 1, -1]
*/
পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
from pprint import pprint
print('A Prewitt compass kernel:')
pprint(ee.Kernel.compass().getInfo())
# Output weights matrix
# [1, 1, -1]
# [1, -2, -1]
# [1, 1, -1]
,একটি 3x3 প্রিউইটের কম্পাস এজ-ডিটেকশন কার্নেল তৈরি করে।
ব্যবহার | রিটার্নস | ee.Kernel.compass( magnitude , normalize ) | কার্নেল |
যুক্তি | টাইপ | বিস্তারিত | magnitude | ফ্লোট, ডিফল্ট: 1 | এই পরিমাণ দ্বারা প্রতিটি মান স্কেল. |
normalize | বুলিয়ান, ডিফল্ট: মিথ্যা | কার্নেলের মানগুলিকে 1 এ যোগ করার জন্য স্বাভাবিক করুন। |
উদাহরণ
কোড এডিটর (জাভাস্ক্রিপ্ট)
print('A Prewitt compass kernel', ee.Kernel.compass());
/**
* Output weights matrix
*
* [1, 1, -1]
* [1, -2, -1]
* [1, 1, -1]
*/
পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
from pprint import pprint
print('A Prewitt compass kernel:')
pprint(ee.Kernel.compass().getInfo())
# Output weights matrix
# [1, 1, -1]
# [1, -2, -1]
# [1, 1, -1]
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eCreates a 3x3 Prewitt's Compass kernel for edge detection in images.\u003c/p\u003e\n"],["\u003cp\u003eAllows for customization by scaling the kernel values with a magnitude argument.\u003c/p\u003e\n"],["\u003cp\u003eOffers an option to normalize the kernel values, ensuring they sum to 1.\u003c/p\u003e\n"],["\u003cp\u003eProvides usage examples in JavaScript, Python, and Colab environments.\u003c/p\u003e\n"]]],["The core function is `ee.Kernel.compass()`, which creates a 3x3 Prewitt compass edge-detection kernel. The function accepts two arguments: `magnitude` (a float to scale values, defaulting to 1) and `normalize` (a boolean to normalize the kernel values to sum to 1, defaulting to false). The output is a kernel with weights represented as `[[1, 1, -1], [1, -2, -1], [1, 1, -1]]`.\n"],null,["# ee.Kernel.compass\n\nGenerates a 3x3 Prewitt's Compass edge-detection kernel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------|---------|\n| `ee.Kernel.compass(`*magnitude* `, `*normalize*`)` | Kernel |\n\n| Argument | Type | Details |\n|-------------|-------------------------|------------------------------------------|\n| `magnitude` | Float, default: 1 | Scale each value by this amount. |\n| `normalize` | Boolean, default: false | Normalize the kernel values to sum to 1. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint('A Prewitt compass kernel', ee.Kernel.compass());\n\n/**\n * Output weights matrix\n *\n * [1, 1, -1]\n * [1, -2, -1]\n * [1, 1, -1]\n */\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nfrom pprint import pprint\n\nprint('A Prewitt compass kernel:')\npprint(ee.Kernel.compass().getInfo())\n\n# Output weights matrix\n\n# [1, 1, -1]\n# [1, -2, -1]\n# [1, 1, -1]\n```"]]