나중에 따라해.. 봐야지 ㅠㅠ

 

[링크 : http://www.gisdeveloper.co.kr/?p=6868]

'Programming > python(파이썬)' 카테고리의 다른 글

파이썬 딕셔너리 변수 생성과 리턴 enumerate, zip  (0) 2022.04.12
python interactive mode  (0) 2022.03.15
pdb  (0) 2022.03.14
python debug (pdb)  (0) 2022.03.04
opencv python  (0) 2022.02.25
Posted by 구차니
Programming/openCV2022. 3. 14. 19:38

imshow만 하면 검은 창만 비어서 나오는데

waitKey()로 메시지 루프(?)를 돌리지 않아서 그렇다고 한다.

 

[링크 : https://stackoverflow.com/questions/21810452]

'Programming > openCV' 카테고리의 다른 글

opencv cv2.imshow() error  (0) 2024.01.16
opencv를 이용한 다중 템플릿 추적  (0) 2024.01.15
virtual mouse  (0) 2022.01.25
opencv-3.4.0 어플리케이션 빌드  (0) 2021.01.14
opencv face detect  (0) 2019.05.10
Posted by 구차니

pdb

 

$ pdb chcker.py 
> /home/minimonk/src/py/chcker.py(1)<module>()
-> import numpy as np
(Pdb) run
Restarting chcker.py with arguments:

> /home/minimonk/src/py/chcker.py(1)<module>()
-> import numpy as np
(Pdb) list
  1  -> import numpy as np
  2   import cv2
  3   import glob
  4   # termination criteria
  5   criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
  6   # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
  7   objp = np.zeros((6*7,3), np.float32)
  8   objp[:,:2] = np.mgrid[0:7,0:6].T.reshape(-1,2)
  9   # Arrays to store object points and image points from all the images.
 10   objpoints = [] # 3d point in real world space
 11   imgpoints = [] # 2d points in image plane.
(Pdb) n
> /home/minimonk/src/py/chcker.py(2)<module>()
-> import cv2
(Pdb) n
ImportError: 'No module named cv2'
> /home/minimonk/src/py/chcker.py(2)<module>()
-> import cv2
(Pdb) q

 

$ whereis pdb
pdb: /usr/bin/pdb2.7 /usr/bin/pdb /usr/bin/pdb3.6 /usr/share/man/man1/pdb.1.gz

$ ls -al /usr/bin/pdb*
lrwxrwxrwx 1 root root  6  4월 16  2018 /usr/bin/pdb -> pdb2.7
lrwxrwxrwx 1 root root 23  2월 28  2021 /usr/bin/pdb2.7 -> ../lib/python2.7/pdb.py
lrwxrwxrwx 1 root root  6  1월 28 12:37 /usr/bin/pdb3 -> pdb3.6
lrwxrwxrwx 1 root root 23 12월  9 06:08 /usr/bin/pdb3.6 -> ../lib/python3.6/pdb.py

$ ls -al /usr/lib/python3.
python3.6/ python3.7/ python3.8/ 

$ ls -al /usr/lib/python3.6/pdb.py 
-rwxr-xr-x 1 root root 61310 12월  9 06:08 /usr/lib/python3.6/pdb.py

[링크 : https://docs.python.org/ko/3.7/library/pdb.html]

'Programming > python(파이썬)' 카테고리의 다른 글

python interactive mode  (0) 2022.03.15
python3 opencv2 checker board  (0) 2022.03.14
python debug (pdb)  (0) 2022.03.04
opencv python  (0) 2022.02.25
python / opencv mouse event  (0) 2022.02.25
Posted by 구차니
Programming/android2022. 3. 11. 10:07

파워 + 볼륨 다운은 리부팅이라 액정 나간 지금 상태로는 쓸모가 없고..

파워 + 볼륨 업 + 볼륨 다운을 한번 시도해 봐야겠네

 

[링크 : https://www.digitub.org/guide/how-to-force-shutdown-your-android-device/]

Posted by 구차니
Programming/golang2022. 3. 10. 19:09

의외로 무지 단순하게 추가가 가능.

아무튼 경로가 겹치지만 않으면 REST API랑 같이 가능하지 않을까 싶은데

이 경우에는 누가 우선순위를 가질지

먼저 등록된 쪽이려나 아니면 별도의 REST로 등록한 쪽이 우선이려나?

 

package main
 
import (
    "net/http"
)
 
func main() {   
    http.Handle("/", http.FileServer(http.Dir("wwwroot")))
    http.ListenAndServe(":5000", nil)
}

[링크 : http://golang.site/go/article/111-간단한-웹-서버-HTTP-서버]

'Programming > golang' 카테고리의 다른 글

golang gore(repl), delve  (0) 2022.03.31
go build 옵션  (0) 2022.03.31
go hello world build static / shared  (0) 2022.02.17
go lang rest  (0) 2022.02.11
golang  (0) 2020.05.18
Posted by 구차니

파이썬을 인터프리터로 생각해서 쓰다보니

희한하게 함수만 되면 어떻게 해야 할지 감이 안왔는데 pdb를 이용하면 단계별로 실행할 수 있어서

함수 자체를 디버깅 할 수 있겠다 싶어서 한번 시도해볼 만 할 듯.

 

[링크 : http://pythonstudy.xyz/python/article/505-Python-디버깅-PDB]

'Programming > python(파이썬)' 카테고리의 다른 글

python3 opencv2 checker board  (0) 2022.03.14
pdb  (0) 2022.03.14
opencv python  (0) 2022.02.25
python / opencv mouse event  (0) 2022.02.25
python op overload magic method  (0) 2021.06.14
Posted by 구차니
Programming/android2022. 3. 2. 13:35

 

RECEIVE_BOOT_COMPLETED
Added in API level 1

public static final String RECEIVE_BOOT_COMPLETED
Allows an application to receive the Intent.ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. If you don't request this permission, you will not receive the broadcast at that time. Though holding this permission does not have any security implications, it can have a negative impact on the user experience by increasing the amount of time it takes the system to start and allowing applications to have themselves running without the user being aware of them. As such, you must explicitly declare your use of this facility to make that visible to the user.

Protection level: normal

Constant Value: "android.permission.RECEIVE_BOOT_COMPLETED"

[링크 : https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED]

[링크 : https://joyfulhome.tistory.com/108]

[링크 : https://heisanbug.tistory.com/5]

'Programming > android' 카테고리의 다른 글

android hdmi rotate  (4) 2022.05.12
안드로이드 강제 종료  (0) 2022.03.11
안드로이드 system.img 마운트 하기  (0) 2022.02.18
안드로이드 64bit 지원  (0) 2021.07.27
핸드폰으로 만든 앱 올리기  (0) 2020.06.17
Posted by 구차니

파이썬에서  openCV highgui를 전체 화면으로 돌려보기

 

[링크 : https://www.javatpoint.com/opencv-mouse-event]

 

full screen (fail)

[링크 : https://gist.github.com/ronekko/dc3747211543165108b11073f929b85e]

 

cv2.waitkey ord

[링크 : https://stackoverflow.com/questions/14494101/using-other-keys-for-the-waitkey-function-of-opencv]

'Programming > python(파이썬)' 카테고리의 다른 글

pdb  (0) 2022.03.14
python debug (pdb)  (0) 2022.03.04
python / opencv mouse event  (0) 2022.02.25
python op overload magic method  (0) 2021.06.14
pythonpath  (0) 2021.04.16
Posted by 구차니

해보니 리눅스에서도 좀 헷갈려 하는지

터치는 마우스 이벤트로 넘어가지 않네. 어떤 이벤트를 통해 터치스크린 손 터치와 펜 터치를 인식하려나?

 

[링크 : https://www.javatpoint.com/opencv-mouse-event]

'Programming > python(파이썬)' 카테고리의 다른 글

python debug (pdb)  (0) 2022.03.04
opencv python  (0) 2022.02.25
python op overload magic method  (0) 2021.06.14
pythonpath  (0) 2021.04.16
python yield  (0) 2021.04.07
Posted by 구차니
Programming/android2022. 2. 18. 18:54

simg2img 유틸리티를 이용해서 변환 후 ext4로 마운트

 

mkdir sys
./simg2img system.img sys.raw
sudo mount -t ext4 -o loop sys.raw sys/

[링크 : https://stackoverflow.com/questions/8663891/how-to-mount-the-android-img-file-under-linux]

'Programming > android' 카테고리의 다른 글

안드로이드 강제 종료  (0) 2022.03.11
안드로이드 앱 자동 실행 설정  (0) 2022.03.02
안드로이드 64bit 지원  (0) 2021.07.27
핸드폰으로 만든 앱 올리기  (0) 2020.06.17
안드로이드 문자열 (string.xml)  (0) 2020.06.11
Posted by 구차니