0

ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download

by montagnem on Fri Nov 16, 2012 9:25 pm

Hi everybody,

i've bought the adalight pack for few days now, and it's great i think, but on all movies with letterbox , black screen the color on top and bottom are completly wrong, dark due to the black color, so i decided to develop a release with detection of black bars letterbox on keyboard event (K for cinema mode) (L for normal mode),

i've implemented a property file for customizing some properties
i've implemented a log file , to see why it's does not work
i've implemented a native keybord listener to detect keyboard touch seeing your favorite cinema movies

Hope you 'll like it,
First commit !

Direct link : http://adalight-with-black-bars-letterbox-detection.googlecode.com/files/Adalight-letterboxV1.0.zip

site : http://code.google.com/p/adalight-with- ... akechanges

PLEASE read the HOW-TO-RUN.txt to run adalight, it's very easy to launch it.
just note JAVA MUST BE INSTALLED BEFORE ALL.
Attachments
Adalight-letterboxV1.0.zip
(556.31 KiB) Downloaded 399 times
montagnem
 
Posts: 4
Joined: Wed Nov 07, 2012 6:33 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download

by adafruit on Fri Nov 16, 2012 9:41 pm

Nice work!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download

by ludo167 on Sun Jun 23, 2013 5:32 am

Hello,

Is it working with XBMC and how to use it ?

Currently, i am using boblight on my XBMC and i try to find a solution for the black bars..

Thnaks for your help,

Ludovic
ludo167
 
Posts: 2
Joined: Sun May 12, 2013 12:11 pm

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download

by montagnem on Sun Jun 23, 2013 8:29 am

Hi ludo167,

The release i've made, consider the total screen of your computer, not necessary a specific window, but all the screen wherever you are, desktop, windows media player, game anything, so i presume on XMBC in fullscreen mode, there is no problem to work.

Have fun with it !

cheers,
montagnem
 
Posts: 4
Joined: Wed Nov 07, 2012 6:33 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE - link download

by trucker0werner on Sun Jul 14, 2013 8:36 pm

thanks for the file to get directly to the program (already was looking for something like that)
but can you look if cyberlink powerdvd 13 the light does work. whit me only the desktop works and when i start cyberlink the lights stay on desktop and i am viewing the movie but whitout the use of the adalight
so the capture source does not take the image from cyberlink
trucker0werner
 
Posts: 34
Joined: Sun Jun 02, 2013 11:32 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by drbroccoli on Sat Jan 04, 2014 1:12 am

Hate to revive a dead thread, but how would I get this to work with the Adalight script for Processing?
drbroccoli
 
Posts: 1
Joined: Sat Jan 04, 2014 1:10 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by txbobs on Fri Apr 11, 2014 6:32 pm

Does this work for anyone? I've tried it but I don't see a difference. Log shows no errors.

txbobs
 
Posts: 22
Joined: Wed Jan 30, 2013 3:11 pm

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by alanpullen on Sun Mar 01, 2015 11:38 am

Hi,

Is it possible to get the source for this? Or a version that uses the same LED configuration as the current Adafruit example (see code below)? I can get this to work, however, my pixels end up being reversed!

Code: Select all | TOGGLE FULL SIZE
static final int leds[][] = new int[][] {
  {0,3,5}, {0,2,5}, {0,1,5}, {0,0,5}, // Bottom edge, left half
  {0,0,4}, {0,0,3}, {0,0,2}, {0,0,1}, // Left edge
  {0,0,0}, {0,1,0}, {0,2,0}, {0,3,0}, {0,4,0}, // Top edge
           {0,5,0}, {0,6,0}, {0,7,0}, {0,8,0}, // More top edge
  {0,8,1}, {0,8,2}, {0,8,3}, {0,8,4}, // Right edge
  {0,8,5}, {0,7,5}, {0,6,5}, {0,5,5}
}; // Bottom edge, right half
alanpullen
 
Posts: 3
Joined: Tue Jan 10, 2012 9:06 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by RON4HMED on Wed Mar 04, 2015 3:56 pm

Hi montagnem or anyone, I have been trying to modify the screen capture from full screen display to specific area. example (800,270, 178, 100) but still can't manage to do that as i am very new in this. Can you please help what should i change in the sketch.

RON4HMED
 
Posts: 1
Joined: Wed Mar 04, 2015 3:40 pm

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by samuskhan on Tue Apr 28, 2015 1:37 am

I'm just getting into adalight and have created a setup already. I would love to use this black box feature but am unsure on how to run it. The adalight code I have is in a .PDE file.

samuskhan
 
Posts: 2
Joined: Tue Apr 28, 2015 1:34 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by samuskhan on Tue Apr 28, 2015 8:10 pm

I open the program in java but i am unsure on how to change the amount of LEDs. I'm very new to this and have only used processing so far.

samuskhan
 
Posts: 2
Joined: Tue Apr 28, 2015 1:34 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by jrankin on Sun May 10, 2015 2:39 pm

I do not have a key switched version but I have modified the Processing code to provide X or Y screen scaling. For black bars at the top you will need Y scaling which is what I get when watching Netflix. The changes force the coordinates for sampling to be a scaled percentage of the screen. So, 90 (%) Y scaling will use the central 90% of the height of the screen.

The modifications to the code are:

In the per display section.

Code: Select all | TOGGLE FULL SIZE
// PER-DISPLAY INFORMATION ---------------------------------------------------

// This array contains details for each display that the software will
// process.  If you have screen(s) attached that are not among those being
// "Adalighted," they should not be in this list.  Each entry in this
// array represents one display.  The first number is the system screen
// number...typically the "primary" display on most systems is identified
// as screen #1, but since arrays are indexed from zero, use 0 to indicate
// the first screen, 1 to indicate the second screen, and so forth.  This
// is the ONLY place system screen numbers are used...ANY subsequent
// references to displays are an index into this list, NOT necessarily the
// same as the system screen number.  For example, if you have a three-
// screen setup and are illuminating only the third display, use '2' for
// the screen number here...and then, in subsequent section, '0' will be
// used to refer to the first/only display in this list.
// The second and third numbers of each triplet represent the width and
// height of a grid of LED pixels attached to the perimeter of this display.
// For example, '9,6' = 9 LEDs across, 6 LEDs down.
// The use scaling switch is to ue X and X scaling to select a percentage of
// the full width, height to be used for coordinate calculations. They are
// set as extra X, Y percentage scaling factors in the display array below.
// This is useful if the video display has black bars on the edges. It will
// effectively use the central scale percentage of each dimension of the
// screen to calculate the sampling coordinates.

static final boolean useXScaling = true;
static final boolean useYScaling = true;
static final int displays[][] = new int[][] {
   {0,24,16, 100, 90} // Screen 0, 24 LEDs across, 16 LEDs down, 100% X scaling 90% Y
//  ,{?,24,16, 100, 100} // Screen ?, also 24 LEDs across and 16 LEDs down. no scaling
};


In the setup() function add an extra float declaration.

Code: Select all | TOGGLE FULL SIZE
  float                   f, range, step, start, scalingOffset;


Change the precompute loop in setup() to be

Code: Select all | TOGGLE FULL SIZE
    // Precompute columns, rows of each sampled point for this LED
    scalingOffset = 0.0;
    range = (float)dispBounds[d].width / (float)displays[d][1];
    if(useXScaling == true) {   
      range *= (float)displays[d][3] / 100.0;
      scalingOffset = (100.0 - (float)displays[d][3]) / 200.0 * (float)dispBounds[d].width;   
    }
    step  = range / 16.0;
    start = scalingOffset + range * (float)leds[i][1] + step * 0.5;
    for(col=0; col<16; col++) x[col] = (int)(start + step * (float)col);
   
    scalingOffset = 0.0;
    range = (float)dispBounds[d].height / (float)displays[d][2];
    if(useYScaling == true) {       
      range *= (float)displays[d][4] / 100.0;
      scalingOffset = (100.0 - (float)displays[d][4]) / 200.0 * (float)dispBounds[d].height;
    }
    step  = range / 16.0;
    start = scalingOffset + range * (float)leds[i][2] + step * 0.5;
    for(row=0; row<16; row++) y[row] = (int)(start + step * (float)row);


That's it. The version in the code here sets Y scaling to 90% which works Netflix on my PC.

jrankin
 
Posts: 1
Joined: Sun May 10, 2015 2:21 pm

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by sithrevenger on Wed Sep 30, 2015 12:09 am

montagnem wrote:Hi everybody,

i've bought the adalight pack for few days now, and it's great i think, but on all movies with letterbox , black screen the color on top and bottom are completly wrong, dark due to the black color, so i decided to develop a release with detection of black bars letterbox on keyboard event (K for cinema mode) (L for normal mode),

i've implemented a property file for customizing some properties
i've implemented a log file , to see why it's does not work
i've implemented a native keybord listener to detect keyboard touch seeing your favorite cinema movies

Hope you 'll like it,
First commit !

Direct link : http://adalight-with-black-bars-letterbox-detection.googlecode.com/files/Adalight-letterboxV1.0.zip

site : http://code.google.com/p/adalight-with- ... akechanges

PLEASE read the HOW-TO-RUN.txt to run adalight, it's very easy to launch it.
just note JAVA MUST BE INSTALLED BEFORE ALL.



How can I get a copy of the source code? I would like to extend some functionality so it can work with 3d displays

Thanks in advance,

sithrevenger
 
Posts: 1
Joined: Wed Sep 30, 2015 12:06 am

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by dpignot2 on Sun Feb 28, 2016 2:48 pm

I also do not know how to change the number of LEDs in the program to match my setup. The source code would be really great.

dpignot2
 
Posts: 1
Joined: Sun Feb 28, 2016 2:47 pm

Re: ADALIGHT - DETECT BLACK BARS - LETTERBOX - CINEMA MODE -

by netflixfan on Wed Jul 26, 2017 10:41 pm

The code sounds helpful. Let me try!
Watching netflix apk in my phone and coming across this amazing website!

netflixfan
 
Posts: 1
Joined: Wed Jul 26, 2017 10:38 pm

Please be positive and constructive with your questions and comments.