Thursday, 31 August 2017

Work out Day 4

Surabaya, 1 September 2017

* Warming up
     - Skipping 50 reps
     - Jumping Jacks 50 reps
     - Squat 20 reps
     - Hip Raises 10 reps
     - Arm & Reg Lift Left 10 reps
     - Arm & Reg Lift Right 10 reps
     - Diving Push Ups 10 reps

* Freeletics : Morpheus (Standart)
    Round 1
     - Push Ups 5 reps
     - Lunges 10 reps
     - Jumping Jacks 20 reps
    Round 2
     - Push Ups 7 reps
     - Lunges 15 reps
     - Jumping Jacks 30 reps
    Round 3
     - Push Ups 10 reps
     - Lunges 20 reps
     - Jumping Jacks 40 reps
    Round 4
     - Push Ups 7 reps
     - Lunges 15 reps
     - Jumping Jacks 30 reps
    Round 5
     - Push Ups 5 reps
     - Lunges 10 reps
     - Jumping Jacks 20 reps

* Then X : Daily workout Tabata Legs Beginner
    Round 1 Repetition 1x
     - Burpees 10 reps
     - Jumping Jacks 40 Seconds
Switch Lunges 40 Seconds
    Round 2 Repetition 4x
     - Lunges 20 Seconds
     - Box Step Up 20 Seconds
     - Bulgarian Splits Squat left 10 reps
     - Bulgarian Split squat right 10 reps
     - Squats 20 Seconds
     - Jumping Squat 20 Seconds
    
* Extend Menu
    Round 1 Repetition 3x
     - Australian Pull ups Wide 5 reps
     - Australian Pull ups Shoulder Width 5 reps
     - Australian Pull ups Closed Grip 5 reps
     - Tuck L-Sit Hold 20 Seconds

* Cooling Down
     - Standing Side Stretch Left 10 Seconds
     - Standing Side Stretch Right 10 Seconds
     - Chest Stretch Left 10 Seconds
     - Chest Stretch Right 10 Seconds
     - Toes Reach
     - Hip Stretch Left 20 Seconds
     - Hip Stretch Right 20 Seconds
     - Butterfly Hold
     - Glutes Stretch Left 15 Seconds
     - Glutes Stretch Right 15 Seconds

END

Wednesday, 30 August 2017

Work out Day 3

Surabaya, 31 Agustus 2017

*Warming Up
     - Skipping 50 reps
     - Jumping Jacks 50 reps
     - Squat 20 reps
     - Hip Raises 10 reps
     - Arm & Reg Lift Left 10 reps
     - Arm & Reg Lift Right 10 reps
     - Plank Knees to Chest 10 reps
     - Diving Push Ups 10 reps

*Freeletics : Metis (standart)
     Round 1
     - Burpees 10 reps
     - Climbers 10 reps
     - Jump 10 reps
     Round 2
     - Burpees 25 reps
     - Climbers 25 reps
     - Jump 25 reps
     Round 3
     - Burpees 10 reps
     - Climbers 10 reps
     - Jump 10 reps

*Then X : Rep Building, Back & Tricep, mix abs (beginner)
     Round 1 Repetition 1x
     - Hanging Scapula Shrugs 35 Seconds
     - Bicycles 50 reps
     Round 2 Repetition 1x
     - Jump Negative Chin Ups 20 Seconds
     - Australian Chin Ups 20 Seconds
     - Jump Negative Pull Ups 20 Seconds
     Round 3 Repetition 1x
     - Plank Open & Closed 35 Seconds
     - Jumping Jacks 40 Seconds
     Round 4 Repetition 1x
     - High Knee Raises 10 reps
     - Bicycles 40 reps
     - Flutter Kick 40 reps
     - Plank Knees to Elbows 20 reps
     - V Ups 10 reps

END

Tuesday, 29 August 2017

Work out Day 2

Surabaya, 30 Agustus 2017

* Warming up
     - Skipping 50 reps
     - Jumping Jacks 50 reps
     - Squat 20 reps
     - Hip Raises 10 reps
     - Arm & Reg Lift Left 10 reps
     - Arm & Reg Lift Right 10 reps
     - Diving Push Ups 10 reps

* Freeletics : Persephone (Standart)
    Round 1
     - Lunges 30 reps
     - Burpees 30 reps
     - Leg Raises 30 reps
     - Rest 30 Seconds
    Round 2
     - Lunges 20 reps
     - Burpees 20 reps
     - Leg Raises 20 reps
     - Rest 20 Seconds
    Round 3
     - Lunges 10 reps
     - Burpees 10 reps
     - Leg Raises 10 reps
     - Rest 10 Seconds

* Then X : Daily workout Tabata  Chest & Tricep Beginner
    Round 1 Repetition 1x
     - Jumping Jacks 45 Seconds
     - Mouuntain Climbers 45 Seconds
    Round 2 Repetition 2x
     - Single Leg Burpees 20 Seconds
     - Low Plank to High Plank 20 Seconds
     - Knee Push Ups 20 Seconds
     - Push Ups 20 Seconds
    Round 3 Repetition 3x
     - Side to Side Push Ups 20 Seconds
     - Mountain Climbers 20 Seconds
    Round 4 Repetition 2x
     - Skull Crushers Closed Grip 20 Seconds
     - Plank Hold 20 Seconds

* Extend Menu
    Round 1 Repetition 3x
     - Australian Pull ups Wide 4 reps
     - Australian Pull ups Shoulder Width 4 reps
     - Australian Pull ups Closed Grip 4 reps
     - Tuck L-Sit Hold 20 Seconds

* Cooling Down
     - Standing Side Stretch Left 10 Seconds
     - Standing Side Stretch Right 10 Seconds
     - Chest Stretch Left 10 Seconds
     - Chest Stretch Right 10 Seconds
     - Toes Reach
     - Hip Stretch Left 20 Seconds
     - Hip Stretch Right 20 Seconds
     - Butterfly Hold
     - Glutes Stretch Left 15 Seconds
     - Glutes Stretch Right 15 Seconds

END

Monday, 28 August 2017

Workout Day 1

Surabaya, Selasa 29 Agustus 2017

* Warming up
     - Stretching
     - Jumping Jacks 50 reps

* Freeletics : Athena
     Round 1 
     - Climbers 25 reps
     - Sit up 25 reps
     - Squat 25 reps
     - Rest 25 Seconds
    Round 2
     - Climbers 20 reps
     - Sit up 20 reps
     - Squat 20 reps
     - Rest 20 Seconds
    Round 3 
     - Climbers 15 reps
     - Sit up 15 reps
     - Squat 15 reps
     - Rest 15 Seconds
    Round 4
     - Climbers 10 reps
     - Sit up 10 reps
     - Squat 10 reps
     - Rest 10 Seconds
    Round 5
     - Climbers 5 reps
     - Sit up 5 reps
     - Squat 5 reps
     - Rest 5 Seconds

* Then X : Daily workout Abs Beginners
    Round 1
     - Plank Hold 40 Seconds
     - Burpees 40 Seconds
    Round 2 Repetition 3x
     - Crucifix 20 Seconds
     - Jumping Jacks 20 Seconds
     - Toe Touch 20 Seconds
   Round 3 Repetition 3x
     - High Knee Raises 20 Seconds
     - Legs Down Hold 20 Seconds
     - In & Out 20 Seconds

* Extend Menu
    Round 1 Repetition 3x
     - Barbell Curl 20kg 10 reps
     - Left HH Pistol 4 reps
     - Right HH pistol 4 reps
    Round 2  Repetition 3x
     - Australian Pull ups Wide 5 reps
     - Australian Pull ups Shoulder Width 5 reps
     - Australian Pull ups Closed Grip 5 reps
     - Tuck L-Sit Hold 15 Seconds

END

Thursday, 13 November 2014

Kalman filter dengan opencv

berikut ini implementasi kalman filter menggunakan open cv, selamat mencoba
-----------------------------------------------------------------------------------------------
hasilnya


-----------------------------------------------------------------------------------------------
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
using namespace cv;

static inline Point calcPoint(Point2f center, double R, double angle)
{
    return center + Point2f((float)cos(angle), (float)-sin(angle))*(float)R;
}

static void help()
{
   printf( "\nExamle of c calls to OpenCV's Kalman filter.\n"
"   Tracking of rotating point.\n"
"   Rotation speed is constant.\n"
"   Both state and measurements vectors are 1D (a point angle),\n"
"   Measurement is the real point angle + gaussian noise.\n"
"   The real and the estimated points are connected with yellow line segment,\n"
"   the real and the measured points are connected with red line segment.\n"
"   (if Kalman filter works correctly,\n"
"    the yellow segment should be shorter than the red one).\n"
            "\n"
"   Pressing any key (except ESC) will reset the tracking with a different speed.\n"
"   Pressing ESC will stop the program.\n"
            );
}

int main(int, char**)
{
    help();
    Mat img(500, 500, CV_8UC3);
    KalmanFilter KF(2, 1, 0);
    Mat state(2, 1, CV_32F); /* (phi, delta_phi) */
    Mat processNoise(2, 1, CV_32F);
    Mat measurement = Mat::zeros(1, 1, CV_32F);
    char code = (char)-1;

    for(;;)
    {
        randn( state, Scalar::all(0), Scalar::all(0.1) );
        KF.transitionMatrix = *(Mat_<float>(2, 2) << 1, 1, 0, 1);

        setIdentity(KF.measurementMatrix);
        setIdentity(KF.processNoiseCov, Scalar::all(1e-5));
        setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));
        setIdentity(KF.errorCovPost, Scalar::all(1));

        randn(KF.statePost, Scalar::all(0), Scalar::all(0.1));

        for(;;)
        {
            Point2f center(img.cols*0.5f, img.rows*0.5f);
            float R = img.cols/3.f;
            double stateAngle = state.at<float>(0);
            Point statePt = calcPoint(center, R, stateAngle);

            Mat prediction = KF.predict();
            double predictAngle = prediction.at<float>(0);
            Point predictPt = calcPoint(center, R, predictAngle);
 
            randn( measurement, Scalar::all(0), Scalar::all(KF.measurementNoiseCov.at<float>(0)));
 
            // generate measurement
            measurement += KF.measurementMatrix*state;

            double measAngle = measurement.at<float>(0);
            Point measPt = calcPoint(center, R, measAngle);

             // plot points
            #define drawCross( center, color, d )                                 \
            line( img, Point( center.x - d, center.y - d ),                \
                               Point( center.x + d, center.y + d ), color, 1, CV_AA, 0); \
            line( img, Point( center.x + d, center.y - d ),                \
                              Point( center.x - d, center.y + d ), color, 1, CV_AA, 0 )

            img = Scalar::all(0);
            drawCross( statePt, Scalar(255,255,255), 3 );
            drawCross( measPt, Scalar(0,0,255), 3 );
            drawCross( predictPt, Scalar(0,255,0), 3 );
            line( img, statePt, measPt, Scalar(0,0,255), 3, CV_AA, 0 );
            line( img, statePt, predictPt, Scalar(0,255,255), 3, CV_AA, 0 );

            if(theRNG().uniform(0,4) != 0)
                KF.correct(measurement);
 
            randn( processNoise, Scalar(0), Scalar::all(sqrt(KF.processNoiseCov.at<float>(0, 0))));
            state = KF.transitionMatrix*state + processNoise;
 
            imshow( "Kalman", img );
            code = (char)waitKey(100);
 
            if( code > 0 )
                break;
        }
         if( code == 27 || code == 'q' || code == 'Q' )
           break;
    }

   return 0;
}

Wednesday, 12 November 2014

Cluster Menggunakan metode K-means dengan opencv

kali ini mencoba melakukan cluster menggunakan metode k-means. cluster sendiri bertujuan untuk mengngelompokan dari suatu data yang memiliki kemiripan fitur antar setiap data, banyak implemntasi dari cluster ini yaitu pada Inteleggent transportationn system dll, berikut hasil dan source codenya....selamat mencoba (ika butuh penjelasan lebih lanjut silahkan hub via email).....
--------------------------------------------------------------------------------------------------
hasilnya (silahkan perbesar)
--------------------------------------------------------------------------------------------------
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
#include <iostream>

using namespace cv;
using namespace std;

// static void help()
// {
//     cout << "\nThis program demonstrates kmeans clustering.\n"
//             "It generates an image with random points, then assigns a random number of cluster\n"
//             "centers and uses kmeans to move those cluster centers to their representitive location\n"
//             "Call\n"
//             "./kmeans\n" << endl;
// }

int main( int /*argc*/, char** /*argv*/ )
{
    const int MAX_CLUSTERS = 5;
    Scalar colorTab[] =
    {
        Scalar(0, 0, 255),
        Scalar(0,255,0),
        Scalar(255,100,100),
       

HSV, Gray, Biner, original

Kali ini mencoba image asli, di convert ke grey, diconvert ke biner, diconvert ke HSV....selamat mencoba


--------------------------------------------------------------------------------------------------------------------

#include <cv.h>
#include <highgui.h>
#include <cxcore.h>

using namespace std;
using namespace cv;

int main()
{
 IplImage *img = cvLoadImage("lenna.png");
 IplImage *hsv = cvCreateImage(cvGetSize(img), 8, 3);
 IplImage *gray = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
 IplImage *biner = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
 cvCvtColor(img, hsv, CV_RGB2HSV);
 cvCvtColor(img, gray, CV_RGB2GRAY);
 cvThreshold(gray, biner, 100, 255, CV_THRESH_BINARY);
 // print rgb values of first pixel
 int r = (int)img->imageData[0];
 int g = (int)img->imageData[1];
 int b = (int)img->imageData[2];