#author("2025-05-23T17:10:25+09:00","default:ait-survey","ait-survey")
#author("2025-06-03T12:42:35+09:00","default:ait-survey","ait-survey")
*Latex [#r6c061a2]
 \setcounter{topnumber}{10}    % ページ上部に配置できる図の最大数
 \setcounter{bottomnumber}{10} % ページ下部に配置できる図の最大数
 \setcounter{totalnumber}{20}  % 1ページに配置できる図の最大数
 \renewcommand{\topfraction}{1.0}    % ページ上部に配置できる図の割合
 \renewcommand{\dblfloatpagefraction}{0.5} % 二段組の場合のフロート最小割合
 \renewcommand{\bottomfraction}{1.0} % ページ下部に配置できる図の割合
 \renewcommand{\textfraction}{0.05}   % テキストが占める最小割合
 \renewcommand{\floatpagefraction}{0.7} % フロートページが占める最小割合
そして
 [!htbp]
そして
 \usepackage{caption}
 \captionsetup[table]{labelsep=space}
 \captionsetup[figure]{labelsep=space}
そして
 \usepackage{caption}
 \captionsetup[figure]{labelsep=quad}
 \captionsetup[table]{labelsep=quad}
*QGIS [#r4cd9296]
XYZ Tilesへの追加(地理院の標準地図)
 https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png
*Jetbrains Toolbox(PyCharm) [#k256e35b]
%%PyCharmの色設定:invert image outputs for dark themes忘れがち(&color(red){画像を表示した際に色が変になるのを防ぐ};)%%~
%%そもそもでjetbrainsのアプリはlinux上では,以下のライブラリがインストールされていることが前提%%
%%sudo apt-get install libfuse2 libxi6 libxrender1 libxtst6 mesa-utils libfontconfig libgtk-3-bin dbus-user-session%%
*WSL&JetBrains [#g864d810]
Windows11-JetBrainsToolbox-PyCharm-WSL2-[[Miniconda:https://www.anaconda.com/docs/getting-started/miniconda/install#linux]]-pip-PyTorchの環境前提で設定や使用方法について述べます.~
**sshでのリモート [#z05beaad]
-OpenSSH サーバーを有効化(Windows側)
-ファイアウォールでポート22(SSH)を開放
-Windows → WSL2 の SSH ポート転送
-WSL2のIP変動への対策(portproxy自動更新)+タスクスケジューラ登録~
なんかよくわからないけど,他のPC(Macとか)からWindows経由でWSL2 UbuntuにJetBrainsからアクセスする環境を暗躍して作る力があるみたい.~
**スタート:Windows TerminalからUbuntuを立ち上げます. [#g2bba2f8]
&ref(ubuubu110.jpg);~
**GUI環境の立ち上げ [#jaccd52b]
 xfce4-session
または,
 startxfce4
と入力しEnter~
&ref(xfce4s.jpg);~
時々(なぜか)立ち上がるUbuntu側のデスクトップ(ねずみ?の絵)が邪魔なら(どうも22.04だと固定されて見えなくなる.20.04ならOK)次のコマンドで消す
 xfdesktop --quit
**jetbrains-toolboxを立ち上げる [#e94e5590]
赤黒面のキューブをクリック~
&ref(ubujb3.jpg);~
それからは「プロジェクト」タブにおいて,実行したいプロジェクトを選ぶか~
&ref(pros1.jpg);~
はじめてのプログラムを実行するときなどは「ツール」タブで使用したいアプリ(PyCharm Professionalなど)を選ぶ~
&ref(tool3s.jpg);~
----
[[VcXsrv:https://sourceforge.net/projects/vcxsrv/]]を使うのがいいか?<-よさそう。但し,再起動時等で,バックグラウンドで動いてないといけない?xeyesが立ち上がるかで動作確認できる?~
(とりあえずVcXsrvのExtra settingsは,全てにチェックして,-acで動いた.そして.bashrcファイルに~
 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
もしくは~
export DISPLAY=:0~
の記載が必要.)~
[[firefox日本語化:https://ameblo.jp/zweisteinjp/entry-12771966249.html]]~
[[自己解決編:https://www.ait-survey.com/?Ubuntu%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%8C%96]]~
ときどきアプリがフリーズするので,その際は
 ps aux | grep clion
 kill -9 1234
%%イーサネット アダプター vEthernet (WSL)で,IPv4 アドレスの値で,export DISPLAY=172.29.32.1:0といいみたい.%%~
あとは,ウイルスバスターのファイヤオールの設定を低にする.~
ipconfig /allの結果です.~

   接続固有の DNS サフィックス . . . . .:
   説明. . . . . . . . . . . . . . . . .: Hyper-V Virtual Ethernet Adapter
   物理アドレス. . . . . . . . . . . . .: 00-15-5D-EE-0A-51
   DHCP 有効 . . . . . . . . . . . . . .: いいえ
   自動構成有効. . . . . . . . . . . . .: はい
   リンクローカル IPv6 アドレス. . . . .: fe80::6944:cb2:cba0:556a%32(優先)
   IPv4 アドレス . . . . . . . . . . . .: 172.29.32.1(優先)
   サブネット マスク . . . . . . . . . .: 255.255.240.0
   デフォルト ゲートウェイ . . . . . . .:
   DHCPv6 IAID . . . . . . . . . . . . .: 536876381
   DHCPv6 クライアント DUID. . . . . . .: 00-01-00-01-27-64-EF-D4-70-85-C2-A6-55-D8
   DNS サーバー. . . . . . . . . . . . .: fec0:0:0:ffff::1%1
                                          fec0:0:0:ffff::2%1
                                          fec0:0:0:ffff::3%1
   NetBIOS over TCP/IP . . . . . . . . .: 有効

Minicondaのインストール
 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
 bash Miniconda3-latest-Linux-x86_64.sh

Pythonのモジュール環境
 pip freeze > requirements.txt
 pip install -r requirements.txt

C++等の開発環境
 sudo apt-get update
 sudo apt-get install build-essential

PyTorchでGPUが利用可能か確認するコマンド
-python3 -c "import torch; print(torch.__version__, torch.cuda.is_available())"~

&ref(bashsh2.png);~
 wsl.exe --distribution Ubuntu -e bash --login

.bash_projectファイルに以下を書いてプロジェクトに保存~
 conda activate GeoLLM

.bashrcファイルに追記~
 if [ -f ".bash_project" ]; then
   source .bash_project
 fi


*GoPro [#y3fbe02b]
[[gopro2gpx:https://github.com/juanmcasillas/gopro2gpx]]で軌跡(gpsデータ.kml,gpx)が保存できます.~
 gopro2gpx -s -vvv /mnt/f/GoPro-Seto_Danchi/20231006/Front/GH020240.MP4 /mnt/f/GoPro-Seto_Danchi/20231006/Front/GH020240
(オリジナルのプログラムでは,kmlファイルで軌跡にポリゴンが付いちゃうので,ラインだけになるように修正しました [[hier:https://github.com/yoshiyama/gopro2gpx]])~
&ref(img221.jpg);~
そもそもで,pythonでGoProのメタデータを処理するモジュールがあるようです.[[gpmf:https://pypi.org/project/gpmf/]]~
(GoProで取得した動画からの位置情報(gpx)をexifデータに保存%%して画像に分割%%する[[プログラム:https://github.com/yoshiyama/gopro2gpx/blob/IBK/exif_gps_write.py]]を作った.%%どうも違う,%%←まずは,タイムスタンプを付けたフレームたちを[[これ:https://github.com/yoshiyama/gopro2gpx/blob/IBK/time_stamp.py]]を使って保存するよう.)また,例えば10フレームピッチで画像をまとめるには[[これ:https://github.com/yoshiyama/gopro2gpx/blob/IBK/copy_sampling.py]].ようするに,以上の流れをまとめると以下になる.~
>動画ファイル→GPSファイルの取得(gopro2gpx) and/or~
>[[タイムスタンプ付きフレーム化:https://github.com/yoshiyama/gopro2gpx/blob/IBK/time_stamp.py]]→[[位置情報付加:https://github.com/yoshiyama/gopro2gpx/blob/IBK/exif_gps_write.py]] with gpx→[[サンプリング:https://github.com/yoshiyama/gopro2gpx/blob/IBK/copy_sampling.py]]~

gps情報を抽出するプログラムのサンプル例は[[これ:https://chat.openai.com/share/0b632b23-8936-4ddf-9ba6-2cb25b6f1628]]~
[[gpmf-parser:https://github.com/gopro/gpmf-parser]]~
survey@SURVEY-C20:/mnt/c/Users/survey/Documents/GitHub/gpmf-parser_yk/demo$ &color(red){./gpmfdemo}; /mnt/c/Users/survey/Desktop/20230609/GX060232.MP4 -a > /mnt/c/Users/survey/Desktop/20230609/GX060232.txt~
[[これ:https://github.com/yoshiyama/gpmf-parser_yk/blob/main/getline.cpp]]で加速度だけ切り出す.~
そして下記で結合する.
 cat file1.txt file2.txt > temp.txt && mv temp.txt file1.txt
このコマンドは file1.txt と file2.txt を temp.txt に連結し、その後で temp.txt を file1.txt にリネームします。
ただし、これは元の file1.txt を上書きします。上書きしたくない場合は、異なるファイル名を使用してください。また、コマンドの成功を確認した後でのみ file1.txt を上書きするといった安全策も考慮するべきです。

[[Top:https://www.ait-survey.com/]]

*ffmpeg [#c86002a6]
-動画の切り取り:ffmpeg -i input.mp4 -ss 00:00:05 -to 00:00:10 -c copy output.mp4~
-フレーム化:ffmpeg -i .\GH030230_cut.mp4 -vf "fps=5" .\GH030230_cut\output_%04d.jpg~
-音声消去:ffmpeg -i input.mp4 -vcodec copy -an output.mp4

*統計的有意差検定 [#gcb23f18]
シャピロ・ウイルク検定(正規分布評価),Baretlettの検定(分散評価),t検定(平均評価)~
(ウェルチのt検定,マン・ホイットニーU検定)~
   from scipy.stats import shapiro
   from scipy.stats import bartlett
   from scipy.stats import ttest_ind

*画像の類似性評価 [#u1e807ae]
-[[Perceptual Similarity:https://github.com/richzhang/PerceptualSimilarity]]
-SSIM
-PSNR
--例えば[[これ:https://github.com/jsh-me/psnr-ssim-tool]](SSIMでscikit-imageを使用するが,バージョンが高すぎるとエラーが出る?)

*ArcGIS [#kb670b4d]
[[逆引きガイド:https://www.esrij.com/cgi-bin/wp/wp-content/uploads/documents/arcgis_pro_user_guide.pdf]]

*python-matplotlibの日本語表示(文字化け対策) [#m37aaa98]
 import matplotlib as mpl
 import matplotlib.pyplot as plt
 # 使用可能なフォントのリストを表示
 # print(mpl.font_manager.findSystemFonts(fontpaths=None, fontext='ttf'))
 # 特定のフォントを指定
 # mpl.rcParams['font.family'] = 'IPAexGothic'
 mpl.rcParams['font.family'] = 'IPAexGothic'
 mpl.rcParams['font.family'] = 'IPAGothic'
 plt.rcParams['font.family'] = 'sans-serif'
 plt.rcParams['font.sans-serif'] = ['IPAexGothic', 'Hiragino Maru Gothic Pro', 'Yu Gothic', 'Meirio', 'Takao', 'IPAexGothic', 'IPAPGothic', 'VL PGothic', 'Noto Sans CJK JP']

[[測量研究室-愛知工業大学工学部土木工学科(Survey Lab., AIT)]]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS