Logan Status Updates

From Foss2Serve
Revision as of 02:39, 14 June 2013 by Lhotchkiss (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Logan Status

12/15/12

  • Was successfully able to fix opencv issue by changing the single line "import opencv" in "configure" to be "import cv".
  • When trying to run mousetrap receiving error "ImportError: No module named mousetrap.app.main"
    • As Amber had mentioned, must be in the src directory before running the "mousetrap" command. Thank you =]
      • >> Fix: Are you in the src directory when you run the command 'mousetrap', for the moustrap.app.main error? (Amber)

12/16/12

  • ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))
    • Changed all instances by running
grep -rl 'import gobject' ./ | xargs sed -i 's/import gobject/from gi.repository import GObject/g
  • Then changed all instances of gobject to GObject with command
grep -rl 'gobject' ./ | xargs sed -i 's/gobject/GObject/g

12/19/12

  • New Error:
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
 import gobject._gobject
[foss2serve@foss2serve src]$ Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "mousetrap/app/main.py", line 91, in start
   idm = pocv.get_idm(self.cfg.get("main", "algorithm"))
 File "mousetrap/ocvfw/pocv.py", line 43, in get_idm
   [])
 File "mousetrap/ocvfw/idm/forehead.py", line 32, in <module>
   from mousetrap.ocvfw.dev.camera import Capture, Point
 File "mousetrap/ocvfw/dev/camera.py", line 34, in <module>
   from mousetrap.ocvfw import _ocv as ocv
 File "mousetrap/ocvfw/_ocv.py", line 282, in <module>
   class OcvfwPython(OcvfwBase):
 File "mousetrap/ocvfw/_ocv.py", line 298, in OcvfwPython
   [])
 ImportError: No module named highgui
    • Changed "opencv.highgui" in mousetrap/ocvfw/backends/OcvfwPython.py to "cv"
  • Another error:
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion  `g_type_from_name (name) == 0' failed
 import gobject._gobject
[foss2serve@foss2serve src]$ DEBUG: mousetrap.ocvfw.idm -> Starting Forehead idm
INFO: mousetrap.ocvfw.idm -> Forhead Algorithm loaded
DEBUG: mousetrap.ocvfw.idm -> Setting Capture
DEBUG: Commons -> New Singleton Add (mousetrap.ocvfw.dev.camera.Camera)
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "mousetrap/app/main.py", line 93, in start
   self.idm.set_capture(self.cfg.getint("cam", "inputDevIndex"))
 File "mousetrap/ocvfw/idm/forehead.py", line 108, in set_capture
   self.cap = Capture(async=True, idx=cam, backend="OcvfwPython")
 File "mousetrap/ocvfw/dev/camera.py", line 71, in __init__
   Camera.start_camera()
 File "mousetrap/ocvfw/_ocv.py", line 111, in start_camera
   self.capture = co.hg.cvCreateCameraCapture( int(self.idx) )
AttributeError: 'module' object has no attribute 'cvCreateCameraCapture'
    • As Amber mentioned, 'cvCreateCameraCapture' no longer exhists. Replaced the line "self.capture = co.hg.cvCreateCameraCapture( int(self.idx) )" with self.capture = co.hg.CaptureFromCAM( int(self.idx) ) in mousetrap/ocvfw/backends/OcvfwBase.py and mousetrap/ocvfw/_ocv.py.
  • Now receiving the same GObject error as Amber:
Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
 import gobject._gobject
[foss2serve@foss2serve src]$ DEBUG: mousetrap.ocvfw.idm -> Starting Forehead idm
INFO: mousetrap.ocvfw.idm -> Forhead Algorithm loaded
DEBUG: mousetrap.ocvfw.idm -> Setting Capture
DEBUG: Commons -> New Singleton Add (mousetrap.ocvfw.dev.camera.Camera)
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
DEBUG: ocvfw -> cmStartCamera: Camera Started
DEBUG: Camera -> Loaded backend OcvfwPython
DEBUG: OcvfwBase -> Changed lk_swap value to True
INFO: mousetrap - Idm loaded and started
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "mousetrap/app/main.py", line 101, in start
   self.itf = MainGui(self)
 File "mousetrap/app/ui/main.py", line 54, in __init__
   self.script = self.ctr.script()
 File "mousetrap/app/main.py", line 229, in script
   return get_script_class(self.cfg.get("scripts", "name"))()
 File "mousetrap/app/ui/scripts/__init__.py", line 45, in get_script_class
   script = __import__(script_name, globals(), locals())
 File "mousetrap/app/ui/scripts/joystick.py", line 36, in <module>
   from ..widgets import Mapper
 File "mousetrap/app/ui/widgets.py", line 237, in <module>
   GObject.type_register(Mapper)
TypeError: argument must be a GObject subclass
    • As Amber mentioned, widget.py must use gobject and not GObject.

12/20/12

  • New error when running. Window pops up for a momment and then this error appears.
Mousetrap - MouseTrap's Interface Built and Loaded
Traceback (most recent call last):
 File "mousetrap/ocvfw/dev/camera.py", line 116, in sync
   Camera.query_image()
 File "mousetrap/ocvfw/_ocv.py", line 125, in query_image
   frame = co.hg.cvQueryFrame( self.capture )
AttributeError: 'module' object has no attribute 'cvQueryFrame'
Traceback (most recent call last):
 File "mousetrap/app/main.py", line 238, in update_frame
   self.itf.update_frame(self.idm.get_capture(), self.idm.get_pointer())
 File "mousetrap/ocvfw/idm/forehead.py", line 128, in get_capture
   self.get_forehead()
 File "mousetrap/ocvfw/idm/forehead.py", line 148, in get_forehead
   face     = self.cap.get_area(commons.haar_cds['Face'])
 File "mousetrap/ocvfw/dev/camera.py", line 373, in get_area
   return Camera.get_haar_points(haar_csd)
 File "mousetrap/ocvfw/_ocv.py", line 335, in get_haar_points
   cascade = co.cv.cvLoadHaarClassifierCascade( haarCascade, self.imgSize )
AttributeError: 'module' object has no attribute 'cvLoadHaarClassifierCascade'
/usr/local/bin/mousetrap: line 139:  9390 Segmentation fault      (core dumped) /usr/bin/python -c "import mousetrap.app.main as mousetrap;   mousetrap.Controller().start();" "$ARGS"
    • Changed "cvLoadHaarClassifierCascade" to "CascadeClassifier" on line 335 of _ocv.py
    • Changed "cvQueryFrame" to "QueryFrame" on line 125 of _ocv.py
    • Changed "cvResize" to "Resize" on line 341
    • Removed cv.cvXXX in _ocv.py to cv.XXXX (Methods no longer start with cvXXX)
  • Now have error of
Camera instance has no attribute 'small_img'

1/4/12

  • It appears that the error is appearing becuase there is no image being captured from the webcam. I am working on trying to figure out why that is.

2/8/13

I updated to Fedora 18 the other day and my installation became corrupt. I have started a fresh install of Fedora 18 and am working on reinstalling mousetrap to try and pick up where I left off.

2/10/13

I have now downloaded and installed mousetrap. I have branched off or Amber's 'fix_install' branch and created my own.

2/12/13, 2/14/13

I have switched over to looking into the CV code to try and get a better idea of the code changes and differences between CV and CV2, and working on getting a better idea on the functions that are available to python-opencv

2/17/13

Posted a link to a quick explanation on what the difference between CV and CV2 are. I also have been looking for documentation from OpenCV 2.4.3, but can't find any. OpenCV released OpenCV 2.4.4 on 2/15/13, and they do not keep a copy of previous documentation accessible on their website. I will be working in documentation of 2.4.4, and will try to determine what has changed. I am going through the OpenCV Tutorial in order to understand it all.

2/19/13

I tried out a fix someone on stackoverflow mentioned of just importing "import cv2.cv as cv" and have it work. I tried that, which worked for some things, but highgui was not included. I now am looking at going through the whole _ocv.py file and trying to update every method to use the correct new functions, not just for errors that are popping up, but everything if possible.

5/2/13

I kind of have mousetrap running on Fedora. The window is showing, and its capturting my picture, but in many colors. Working to figure out why the image is like it is.

May 2013

By changing showPointMapper to False in the user config file, I was able to get the GUI running, and king of displaying a picture. There is no mouse function currently. The picture is only focusing on the top portion of the image, so it doens't capture the face. It also displays 3 copies of the image, virtically next to each other, each in a different color shade (red, blue, green).

After getting that far, I had an issue with my VM and had to rebuild. With my new installtion I am having issues with it constantly freezing, losing camera connection, and not being able to kill the program. I am working on trying to resolve these issues so that I can return to the location where I was before.

My next step is trying to determine why the capture is focusing on the upper location of the frame. If I can get the capture to work properly, I will move to trying to fix the mouse movements.

6/2 - 6/7

Still having issues with the VM. I have been able to work on some things, but the freezing is making it very difficult. I have been able to perform some runs, where I am having an error with GetSubRect having incorrect input array size. While trying to work on that, I ran into more VM issues, where the camera would not be freed after the program terminated. I am working on trying to get a dedicated machine setup to see if any of these issues can be alleviated.

6/8 - 6/14

I have installed Fedora and Mousetrap on a dedicated computer, and am receiving much better performance. I have the mousetrap window showing a portion of the camera issue (as mentioned a couple weeks ago), with the weird colors. Unlike before, the screen is continually running without any errors or freezes.

Logan 2013-06-13.png

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox