Motion Detection using camera?

by Rijad Sacirovic » Mon, 07 Jun 2010 07:45:43 GMT


Sponsored Links
 Is this possible?
How do i do it?
I want to learn but dont know where to begin even :/

--



Motion Detection using camera?

by TreKing » Tue, 08 Jun 2010 01:18:35 GMT


 



Is what possible? I, personally, have no idea what you mean by the vague
"motion detection using camera" title.



Use the camera to detect motion maybe? Without more information on what
you're actually trying to do, that's the best answer you're likely to get.



Try the documentation on the camera?

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


Motion Detection using camera?

by BobG » Tue, 08 Jun 2010 03:14:58 GMT


 This is the realm of 'image processing'. One algorithm might be: run a
couple of nested for loops and find the x,y loc of the brightest pixel
or the center of some bright feature, and do this in two frames. If
the feature moves 3 pixels, you have solved the problem.
Sounds easy when explained by a master huh?

--



Other Threads

1. Resuming Previous Activity Properly

I have two Activities which both share a toolbar component that
extends a linear layout, the toolbar looks like this:


public class Toolbar extends LinearLayout {

...

public Toolbar(final Context con, AttributeSet attrs) {
                super(con, attrs);
                setGravity(Gravity.BOTTOM);
....

TextView tab1 = (TextView) findViewById(R.id.tab1);
                tab1.setOnClickListener(new OnClickListener() {
                        public void onClick(View v) {
                                Intent intent = new Intent(con, 
ShowDashboard.class);
                                
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                                //con.startActivity(intent);
                                ((Activity)con).finish();
                                ((Activity)con).startActivity(intent);

                        }
                });

                TextView tab2 = (TextView) findViewById(R.id.tab2);
                tab2.setOnClickListener(new OnClickListener() {
                        public void onClick(View v) {
                                Intent intent = new Intent(con, ShowLog.class);
                                //con.startActivity(intent);
                                
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                                ((Activity)con).finish();
                                ((Activity)con).startActivity(intent);
                        }
                });

....
}

When I click on tab 1 it works fine, it launches an acitvity
containing a webview. Likewise, tab 2 launches another tab with a
webview. The issue comes when I click tab 1 again, it restarts the
activity from scratch. I would like it to restore the state of the
webview to where it was. I believe I need to store the webview state
somehow and then on startup detect a restart and restore the webview
through the savedInstanceState Bundle. The issue I have is that the
bundle is always null even if I save it in the onSaveInstanceState
method of tab 1.

Tab 1's code looks like this:

@Override
        protected void onCreate(Bundle savedInstanceState) {
...

if (savedInstanceState != null) {
                        final File f = new File(lCurrentPicture);
                        webview.restorePicture(savedInstanceState, f);
                        webview.restoreState(savedInstanceState);
                        f.delete();
                        SharedPreferences.Editor editor = settings.edit();
                        editor.remove("dashboardwebviewfile");
                        editor.commit();

                } else {
                        webview.loadUrl("http://www.yahoo.com");
                }
}

@Override
        protected void onSaveInstanceState(Bundle outState) {
                super.onSaveInstanceState(outState);
                isSavedInstanceState = true;
                Log.i("ShowDashboard", "onSaveInstanceState");
                File mThumbnailDir = getDir("thumbnails", 0);
                webview.saveState(outState);


                final File f = new File(mThumbnailDir, webview.hashCode() +
"_pic.save");
                boolean savedPic  = webview.savePicture(outState, f);
                Log.d("ShowDashboard", "savedPic:" + savedPic);
                outState.putString("currentPicture", f.getPath());


        }

Tab 2 looks similar, any help is appreciated. Thanks!

-- 

2. modifying build.prop on emulator

I want to change build.prop file on my emulator.
Here are the speps I have done:
  emulator vd <device> artition-size 128
  adb pull /system/build.prop
edit build.prop
  adb mount
  adb push build.prop /system/build.prop
  adb shell rm /system/app/SdkSetup.apk
Close emulator, delete the files: userdata-qemu.img, userdata.img, cache.img 
from avd\<device> directory
start emulator:  
  emulator vd <device>
  adb pull /system/build.prop
I see the original build.prop file, not modified one, I can also see 
SdkSetup.apk in system/app, 
so the the emulator is reverted back to its original stage.
Am I missing something?

-- 

3. Sharing gps stuff between several activity

4. Record the Output audio from device

5. EditText View control distorted in a qvga android phone as well as the emulator

6. receive GPS enable/disable settings event

7. Are the gyroscope features broken in Android 2.3 or Nexus S?