Skip to content

Commit

Permalink
Rename package from hw demo to remmel + basic logo
Browse files Browse the repository at this point in the history
  • Loading branch information
remmel committed Mar 11, 2021
1 parent aaf958a commit 0c89d68
Show file tree
Hide file tree
Showing 32 changed files with 170 additions and 105 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ I added 2 features :

## Recorder

<img src="HwAREngineDemo/src/test/resources/00000012_image.jpg" width="240" /> ![](HwAREngineDemo/src/test/resources/00000012_depth.png) <img src="doc/plymeshlab.png" width="240" />
<img src="Recorder3D/src/test/resources/00000012_image.jpg" width="240" /> ![](Recorder3D/src/test/resources/00000012_depth.png) <img src="doc/plymeshlab.png" width="240" />

Every seconds save the rgb and depth image, and its pose in the /storage/emulated/0/Android/data/com.huawei.arenginesdk.demo/files/
Every seconds save the rgb and depth image, and its pose in the /storage/emulated/0/Android/data/com.remmel.recorder3d/files/

Features :
- Save depth (240x180 - fancy png, binary depth16)
Expand Down
2 changes: 1 addition & 1 deletion Recorder3D/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 28

defaultConfig {
applicationId "com.huawei.arenginesdk.demo"
applicationId "com.remmel.recorder3d"
minSdkVersion 26
targetSdkVersion 27
versionCode 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.graphics.Bitmap;

Expand All @@ -20,7 +20,7 @@ public class ImageUtilsInstrumentedTest {
private static final String TAG = ImageUtilsInstrumentedTest.class.getSimpleName();

private static final File DIR = InstrumentationRegistry.getInstrumentation().getTargetContext().getExternalFilesDir("test");
// private static final String DIR = "/storage/emulated/0/Android/data/com.huawei.arenginesdk.demo/files/test";
// private static final String DIR = "/storage/emulated/0/Android/data/com.remmel.recorder3d/files/test";
private static final String IMAGE_YUVNV21 = DIR + "/00000012_image.bin";
private static final String TUMDEPTH = DIR + "/tum/1305031102.160407.png";
private static final int IMG_W = 1440;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.graphics.Bitmap;
import android.util.Log;
Expand All @@ -17,7 +17,7 @@ public class PlyUtilsTest {

private static final String TAG = PlyUtilsTest.class.getSimpleName();

private static final String DIR_DATASET = "/storage/emulated/0/Android/data/com.huawei.arenginesdk.demo/files/2020-12-17_141504";
private static final String DIR_DATASET = "/storage/emulated/0/Android/data/com.remmel.recorder3d/files/2020-12-17_141504";
private static final File DIR = InstrumentationRegistry.getInstrumentation().getTargetContext().getExternalFilesDir("test");
private static final String DEPTH16 = DIR + "/00000012_depth16.bin";
private static final String IMAGE_YUVNV21 = DIR + "/00000012_image.bin";
Expand Down Expand Up @@ -60,7 +60,7 @@ public void mergePly() throws IOException {

@Test
public void bulkWritePly() throws IOException {
PlyUtils.bulkWritePly(new File("/storage/emulated/0/Android/data/com.huawei.arenginesdk.demo/files/2021-02-15_025939"));
PlyUtils.bulkWritePly(new File("/storage/emulated/0/Android/data/com.remmel.recorder3d/files/2021-02-15_025939"));
}

@Test
Expand Down
37 changes: 5 additions & 32 deletions Recorder3D/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.huawei.arengine.demos"
android:versionCode="120"
android:versionName="2.15.0.1">
package="com.remmel.recorder3d">
<uses-permission android:name="android.permission.CAMERA" />

<application
Expand All @@ -14,7 +12,7 @@
android:theme="@style/AppTheme">

<activity
android:name="com.huawei.arengine.demos.ChooseActivity"
android:name="com.remmel.recorder3d.ChooseActivity"
android:exported="true"
android:screenOrientation="locked">
<intent-filter>
Expand All @@ -33,42 +31,17 @@
android:value="androidhwext:style/Theme.Emui" />
</activity>
<activity
android:name="com.huawei.arengine.demos.java.world.WorldActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="locked"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.huawei.arengine.demos.java.face.FaceActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="locked"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.huawei.arengine.demos.java.body3d.BodyActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="locked"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.huawei.arengine.demos.java.hand.HandActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="locked"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.huawei.arengine.demos.java.health.HealthActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:configChanges="orientation|screenSize"
android:screenOrientation="portrait" />
<activity
android:name="com.huawei.arengine.demos.java.measure.MeasureActivity"
android:name="com.remmel.recorder3d.measure.MeasureActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:configChanges="orientation|screenSize" />
<activity
android:name="com.huawei.arengine.demos.java.recorder.RecorderActivity"
android:name="com.remmel.recorder3d.recorder.RecorderActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape" />

<activity
android:name="com.huawei.arengine.demos.java.recorder.preferences.RecorderPreferenceActivity"
android:name="com.remmel.recorder3d.recorder.preferences.RecorderPreferenceActivity"
android:theme="@style/Theme.AppCompat.NoActionBar" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import android.os.Bundle;
import android.util.Log;

import com.huawei.arengine.demos.R;
import com.huawei.hiar.exceptions.ARFatalException;
import com.remmel.recorder3d.R;

/**
* This activity is used to redirect the user to AppGallery and install the AR Engine server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

import com.huawei.arengine.demos.ChooseActivity;
import com.remmel.recorder3d.ChooseActivity;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@
* limitations under the License.
*/

package com.huawei.arengine.demos;
package com.remmel.recorder3d;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.Nullable;

import com.remmel.recorder3d.R;
import com.huawei.arengine.demos.common.PermissionManager;
import com.huawei.arengine.demos.java.measure.MeasureActivity;
import com.huawei.arengine.demos.java.recorder.RecorderActivity;
import com.huawei.arengine.demos.java.recorder.preferences.RecorderPreferenceActivity;
import com.remmel.recorder3d.measure.MeasureActivity;
import com.remmel.recorder3d.recorder.RecorderActivity;
import com.remmel.recorder3d.recorder.preferences.RecorderPreferenceActivity;

/**
* This class provides the permission verification and sub-AR example redirection functions.
Expand All @@ -42,6 +45,7 @@ public class ChooseActivity extends Activity {
private static final String TAG = ChooseActivity.class.getSimpleName();

private boolean isFirstClick = true;
TextView textView;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -51,6 +55,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.activity_choose);
// AR Engine requires the camera permission.
PermissionManager.checkPermission(this);

textView = findViewById(R.id.txt_choose);
textView.setText(BuildConfig.APPLICATION_ID + "/" + BuildConfig.VERSION_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.measure;
package com.remmel.recorder3d.measure;

import android.app.Activity;
import android.content.Intent;
Expand All @@ -8,7 +8,7 @@
import android.view.View;
import android.widget.Toast;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;
import com.huawei.arengine.demos.common.DisplayRotationManager;
import com.huawei.hiar.ARConfigBase;
import com.huawei.hiar.AREnginesApk;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.measure;
package com.remmel.recorder3d.measure;

import android.app.Activity;
import android.content.Context;
Expand All @@ -8,7 +8,7 @@
import android.util.Log;
import android.widget.TextView;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;
import com.huawei.arengine.demos.common.ArDemoRuntimeException;
import com.huawei.arengine.demos.common.DisplayRotationManager;
import com.huawei.arengine.demos.common.TextureDisplay;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import com.huawei.hiar.ARPose;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

public class FpsMeter {
protected short frames = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.graphics.Bitmap;
import android.graphics.ImageFormat;
import android.graphics.Rect;
import android.graphics.YuvImage;
import android.media.Image;
import android.util.Log;

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.ByteBuffer;
import java.nio.file.Files;

//Multiple paths
//mContext.getFilesDir() /data/user/0/com.huawei.arenginesdk.demo/files/remy/myimage302.jpg
//mContext.getFilesDir() /data/user/0/com.remmel.recorder3d/files/remy/myimage302.jpg
//Environment.getExternalStorageDirectory() /storage/emulated/0/remy/myimage460.jpg
//Environment.getDataDirectory() /data/remy/myimage262.jpg
//Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); /storage/emulated/0/Download/remy/myimage128.jpg
/// this.mContext.getExternalFilesDir("remy") /storage/emulated/0/Android/data/com.huawei.arenginesdk.demo/files/remy/myimage264.jpg
/// this.mContext.getExternalFilesDir("remy") /storage/emulated/0/Android/data/com.remmel.recorder3d/files/remy/myimage264.jpg
public class IoUtils {
private static final String TAG = IoUtils.class.getSimpleName();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import java.nio.ByteBuffer;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.graphics.Bitmap;
import android.util.Log;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraManager;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.util.Size;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;
import com.huawei.arengine.demos.common.DisplayRotationManager;
import com.huawei.arengine.demos.java.recorder.preferences.AppSharedPreference;
import com.huawei.hiar.ARConfigBase;
import com.remmel.recorder3d.recorder.preferences.AppSharedPreference;
import com.huawei.hiar.AREnginesApk;
import com.huawei.hiar.ARSession;
import com.huawei.hiar.ARWorldTrackingConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

import android.app.Activity;
import android.content.Context;
Expand All @@ -14,11 +14,11 @@
import android.widget.TextView;
import android.widget.Toast;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;
import com.huawei.arengine.demos.common.ArDemoRuntimeException;
import com.huawei.arengine.demos.common.DisplayRotationManager;
import com.huawei.arengine.demos.common.TextureDisplay;
import com.huawei.arengine.demos.java.recorder.preferences.AppSharedPreference;
import com.remmel.recorder3d.recorder.preferences.AppSharedPreference;
import com.huawei.hiar.ARCamera;
import com.huawei.hiar.ARCameraIntrinsics;
import com.huawei.hiar.ARFrame;
Expand All @@ -28,11 +28,8 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder;
package com.remmel.recorder3d.recorder;

/**
* Usage:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.huawei.arengine.demos.java.recorder.preferences;
package com.remmel.recorder3d.recorder.preferences;

import android.content.Context;
import android.content.SharedPreferences;
Expand All @@ -7,7 +7,7 @@

import androidx.annotation.StringRes;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;
import com.huawei.hiar.ARConfigBase;

public class AppSharedPreference {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package com.huawei.arengine.demos.java.recorder.preferences;
package com.remmel.recorder3d.recorder.preferences;

import android.content.Context;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraManager;
import android.os.Bundle;
import android.util.Log;
import android.util.Size;
import android.view.Window;
import android.view.WindowManager;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.huawei.arengine.demos.R;
import com.remmel.recorder3d.R;

import java.util.ArrayList;
import java.util.List;
Expand Down
Loading

0 comments on commit 0c89d68

Please sign in to comment.