Skip to content

Instantly share code, notes, and snippets.

@Gotoryoo
Created November 29, 2016 05:14
Show Gist options
  • Save Gotoryoo/52434507886542bcd0f998b555255157 to your computer and use it in GitHub Desktop.
Save Gotoryoo/52434507886542bcd0f998b555255157 to your computer and use it in GitHub Desktop.
読み込んだ画像の名前をある定義によって分割し、分割した一つ一つをix,iy,izと定義するプログラム。
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 13:32:24 2015
読み込んだ画像の名前をある定義によって分割し、分割した一つ一つをix,iy,izと定義するプログラム
@author: ryousuke
"""
fullpath = "C:\\Users\\ryousuke\\Desktop\\nakakenn\\img\\gtrd_0_89_15.bmp"
print fullpath
filename = fullpath.split(".")
index = filename[0].split("_")
ix = int(index[1])
iy = int(index[2])
iz = int(index[3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment