Skip to content

Instantly share code, notes, and snippets.

View mzielu's full-sized avatar

Marcin Zieliński mzielu

  • Kraków, Poland
View GitHub Profile
public interface VoiceManager {
void subscribeForQuestions();
void unsubscribe();
}
public interface FaceManager {
void subscribeForEvents();
void unsubscribe();
double currentHorizontalDirection();
double currentVerticalDirection();
}
public class SpeechService extends Service implements RecognitionListener {
private SpeechRecognizer speechRecognizer;
@Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
}
@Override
public void onDestroy() {
public class HeadPoseService extends Service {
private static final int NOT_YET_RESULT = -1000;
boolean isWorking = false;
FaceDet mFaceDet;
double leftEyeTop = NOT_YET_RESULT;
double leftEyeBottom = NOT_YET_RESULT;
double leftEyeLeft = NOT_YET_RESULT;
double leftEyeRight = NOT_YET_RESULT;
public class GazeService extends Service {
private static final String TAG = "CommunicationWithAvatar";
public static final int JAVA_DETECTOR = 0;
// matrix for zooming
private Mat mZoomWindow;
private Mat mZoomWindow2;
private Mat mRgba;
private Mat mGray;
public class MainAndroidController extends Activity implements CameraBridgeViewBase.CvCameraViewListener2 {
UnityPlayer m_UnityPlayer;
static final double NOT_YET_CALCULATED = 0;
static final double EYE_EDGE_FACTOR = 0.77;
static final double MAX_SIDES_ANGLE = 90;
static final double MAX_VERTICAL_ANGLE = 90;
static final double WHOLE_ANGLE = 180;
@mzielu
mzielu / build.gradle
Last active September 27, 2018 10:57
apply plugin: 'com.android.library'
version = "${rootProject.ext.releaseVersionName}"
group = "com.tzutalin.dlib-android-app"
android {
compileSdkVersion rootProject.ext.androidCompileSdkVersion
buildToolsVersion "${rootProject.ext.androidBuildToolsVersion}"
defaultConfig {
@relation Basketball-positions
@attribute 'points' numeric
@attribute 'rebounds' numeric
@attribute 'assists' numeric
@attribute 'blocks' numeric
@attribute 'steals' numeric
@attribute 'turnovers' numeric
@attribute 'fouls' numeric
@attribute '3P%' numeric
@attribute 'FG%' numeric
private ExampleActivityBinding binding;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.example_activity, new ExampleDataComponent());
binding.setUser(new User("User Name", "http:/example.com/user/someUserAvatar.png"));
}
<data>
<variable
name="user"
type="agency.tango.User" />
</data>
<agency.tango.android.avatarview.views.AvatarView
android:layout_width="100dp"
android:layout_height="100dp"
bind:av_border_color="@android:color/white"