2024-05-01から1ヶ月間の記事一覧

試行回数と信頼性

ロボットの確率・統計 第5章以下の2つのグラフを再現したい clear; close all; ts = 0:0.01:1; as = [1 0 0 1 1]; bs = [1 1 1 1 1]; p_t_a1_i_1 = zeros(length(as), length(ts)); p_t_a1_i_1(1,:) = 1/length(ts); ps_a = compute_posteriors(ts, as, p_…

ベルヌーイ分布・二項分布・マルチヌーイ分布・多項分布・正規分布

Google earth engineで衛星画像解析

zenn.dev

メトロポリス・ヘイスティングス法でMCMC

import math import random import matplotlib.pyplot as plt x = [2.4,3.2,2.2,4.6,3.3] def kernel(theta): prod = 1 for i in range(5): prod = prod * 1/math.sqrt(2*math.pi)*math.exp(-(x[i]-theta)**2/2) res = prod * 1/math.sqrt(20000*math.pi)*ma…

Unityでロケットのシミュレーション

www.youtube.comwww.youtube.comwww.youtube.com

QGISのラスタファイルをポリゴンで切り抜く

ポリゴン Raster>Extraction>Clip Raster by Mask Layer 設定 Selected features onlyにチェックを入れる 切り抜けた

PyQGISでNDVI

微妙に動いている? from osgeo import _gdal as gdal from osgeo import osr import numpy as np import rasterio import cv2 ### READ FROM RASTER layer = iface.layerTreeView().selectedLayers()[0] rasterPath = layer.source() ext = layer.extent() …

PyQGISでOpenCVを用いて画像処理

以下のgeotの計算方法 geot = [260270.3168900000164285,116.45/5000.0, 0, 9856611.2914200015366077, 0, -116.45/5000.0]ラプラシアンフィルタの例 from osgeo import _gdal as gdal from osgeo import osr import numpy as np import rasterio import cv2…

macOSのQGISでSemi Automatic Classification (SAC)プラグインのエラー

rs_calcが無いといわれるので、強制的にインポートした /Users/shohei/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/interface/band_calc_tab.py #try: # from remotior_sensus.tools import…

macOSでGRASSが起動しない

ロケールの設定をGrass.shに追加したら起動した/Applications/GRASS-8.3.app/Contents/MacOS/Grass.sh 1 #! /bin/bash 2 ############################################################################# 3 # 4 # MODULE: GRASS Initialization 5 # AUTHOR(…

MacのExcel VBAでステップ実行(Step Into)

Shift+Command+Iを送り続けるとステップ実行できる。answers.microsoft.com

QGISのPrint Layoutの凡例が更新されない

メインの地図上のレイヤーの名前を変更するとアップデートされた

QGISでデフォルトのダークカラースキームで文字が読めない

プラグインでLoad QSS - UI themsを導入し、Darkを選択する。 デフォルトのダークカラーだと黒背景に黒文字で読めなかったところが、白文字になって読めるようになる。