applications – Software to generate and display OLED burn-in offset map as watermark over display?

Have a Galaxy S8+ with signs of burn-in – not serious but white screens are looking a little pink in regions.
Searching for fixes to burn-in only comes up with programs to flex the pixels which I don’t believe can do anything. What I would like to find if it exists is a way to display a semi-transparent watermark over the entire screen in order to boost the blue and green pixels in the burnt regions to even out the display – the image could be either traced by user on the effected screen, or generated from a photo taken by a second camera..

Is there either an existing app on the market to do this or a way of doing it by hand with some type of hackery?

How to generate a context-free grammar that defines a regex expression

As the title says, I have been asked to generate a grammar that defines the language of regular expressions. The symbols are: + . * | ? char

I tried and came up with this but it doesn’t work when trying to create a parse tree so it’s wrong but I’m so lost on how to even begin to define the different rules. So any help either on the question specifically, on improving/re-writing what I got, or general step-by-step guidance to figuring out how to write a grammar from just being given symbols is appreciated.

enter image description here

ppi – How do I generate high quality prints with an ink jet printer?

Making effective use of professional photographic ink jet printers is tricky business, especially when the statistics that are commonly used to describe these printers are vague and misleading. Learning how a ink jet printers function, how to properly interpret their capabilities, and make the most effective use of those capabilities, is possible. You may need to deal with a little mathematics to fully understand, but for those brave enough to endure, your answers are below.

Terminology

In the printing world, there are numerous terms used to describe the various aspects of a printers behavior. Everyone has heard of DPI, many of you have heard of PPI, but not everyone understands the true meaning of these terms and how they relate.

  • Pixel: Smallest unit of an image.
  • Dot: Smallest element of a print generated by a printer.
  • DPI: Dots per Inch
  • PPI: Pixels per Inch

Understanding terms is important, but everything has context, and understanding how these terms relate to each other in the context of ink jet printing is critical to learning how to generate the best quality prints. Every image is composed of pixels, and every pixel in an image represents a single distinct color. The color of a pixel may be produced in a variety of ways, from the blending of RGB light on a computer screen, to a solid mixture of dye in a dye sublimation printer, to the dithered composition of colored dots printed by an ink jet printer. The latter is of interest here.

PPI to DPI Relationship

When an ink jet printer renders an image, it has a limited set of colors to work from, usually cyan, magenta, yellow, and black. Higher-end printers may include a variety of other colors as well, such as blue, orange, red, green, and various shades of gray. To produce the wide range of colors expected of a photo printer, multiple dots of each color must be combined to create a single color as represented by a pixel. A dot may be smaller than a pixel, but should never be larger. The maximum number of dots that an ink jet printer may lay down in a single inch is the measurement of DPI. Since multiple printer dots must be used to represent a single pixel, the PPI of a printer will never be as high as the printers maximum DPI.

The Human Eye

Before diving into the details of how to achieve maximum print quality, it is important to understand how the human eye sees a print. The eye is an amazing device, and as photographers, we know that better than most. It can see amazing clarity and dynamic range. It also has a limit on its ability to resolve detail, and that directly affects what resolution you may choose to print at.

Resolving Power

The maximum resolving power of the human eye is lower than printer manufacturers would have you believe, which tends to be 720ppi or 600ppi, depending on the manufacturer. It is also lower than most print fanatics would have you believe, as well. Depending on the intended viewing distance, the lowest acceptable PPI may be considerably lower than you might expect. The most general way to describe the resolving power of the human eye is as one arcminute, or 1/60th of a degree, at any distance (for the average eye…those with 20/10 vision see about 30% better, or 1/86th of a degree acuity.) For normal vision, we can use this to approximate the minimum resolvable size of a pixel at a given distance, so assuming a hand-held viewing distance of about 10 inches for a 4×6 inch print:

(tan(A) = opposite / adjacent )

tan(arcminute) = size_of_pixel / distance_to_image
tan(arcminute) * distance_to_image = size_of_pixel
tan(1/60) * 10″ = 0.0029″ min pixel size

For sanity sake, we can make the tangent of arcminute, or resolving power P, a constant:

P = tan(arcminute) = tan(1/60) = 0.00029

This may be translated into pixels per inch like so:

1″ / 0.0029″ = 343.77 ppi

The minimum resolvable pixel size may be calculated for any distance, and as distance increases, the minimum required PPI will shrink. If we assume an 8×10 print at a viewing distance of around a foot and a half, we would have the following:

1″ / (0.00029 * 18″) = 191.5 ppi

A general formula for this can be created, where D is the viewing distance:

1/(P*D) = PPI

As a simple rule, regardless of how close you may view a photograph, the unaided 20/20 eye is incapable of resolving more than about 500ppi (for those with 20/10 vision, resolving power reaches about 650ppi.) The only reason one may surpass a resolution of 500ppi is when you require more than a standard 300-360ppi, and you need to stay within the limitations of your hardware (i.e. 600ppi for Canon printers.)

Resolving Power for 20/10 Vision

While the very vast majority of the time, you will not need more than 300-360ppi, if you do have very fine detail that requires a high PPI, you may wish to base your calculations on a higher visual acuity. For viewers with 20/10 vision, visual acuity is a bit improved, at around 1/86th of a degree (0.7 arcminute). The constant P at this level of acuity is smaller, and therefor necessitates a smaller pixel when printing images with very fine detail.

Given our formula from before, adjusted for improved acuity:

P = tan(arcminute) = tan(1/86) = 0.00020

Taking our 4×6″ print viewed at 10″, and plugging this into our general formula for PPI, we would have a PPI of:

1″ / (0.0002 * 10″) = 1″ / 0.002″ = 500 ppi

Ok, enough math for now. On to the good stuff.

Print Resolution

Now that we know the limits of the human eye, we can better determine what resolution to print at for a given paper size and viewing distance. An ink jet printer is not capable of producing ideal results at any PPI, so we must compromise, and choose a resolution that is more appropriate to the hardware. Anyone who has investigated the “best” resolution to print at has likely come across many common terms, such as 240ppi, 300ppi, 360ppi, 720ppi, etc. These numbers are often based in truth, but when to use them, and when you might actually choose a lower resolution, is often left unexplained.

When choosing a resolution to print at, you must make sure it is divisible into the lower bound of the DPI your printer is capable of. In the case of an Epson, this is likely 1440, and in the case of a Canon it is likely to be 2400. Every printer has a native internal pixel resolution that any image printed will be resampled to. In the case of Epson, this is usually 720ppi, and in the case of Canon it is usually 600ppi. The PPI of printers is rarely publicized by the respective manufacturers, so it is up to you to figure it out. A handy little tool called PrD, or Printer Data, can help. Just run, and your printers native PPI will be displayed.

Optimal Resolution

Determining the optimal resolution to print at, now that we have both the printers DPI and native PPI, should be a trivial task: use the native PPI. While this seems logical, there are many reasons why this is less than idea. For one, 720ppi is well beyond the maximum resolving power of the human eye (@500ppi). Using the maximum resolution is also likely to use more ink (wasting money), while also reducing your tonal range. More on tonal range in a bit.

If we assume a minimum viewing distance of approximately six inches for a 4×6 print, the theoretical PPI would be about 575ppi. This rounds up to a printer-native 600ppi on Canon, and 720ppi on Epson. A viewing distance of six inches for a person with 20/20 vision (corrected or otherwise) is extremely close, and rather unlikely. If we assume a more realistic minimum viewing distance of ten inches, our theoretical PPI drops to about 350.

If we printed our 4×6 photo at a resolution of 350ppi, the results would likely be less than stellar. For one, 350 is not evenly divisible into either 600 or 720, which will cause the printer driver to do some rather unsightly, distorted scaling for us. Any regular, repeating patterns will show up with very undesirable moiré, which can greatly reduce the quality of a print. Choosing a resolution that evenly divides into the native printer resolution, such as 360ppi for Epson, or 300ppi for Canon, will help ensure that any scaling the driver does will produce even results.

Here are some common print resolutions for various DPI’s:

  1200 | 1440 | 2400  
 =-=-=-=-=-=-=-=-=-=-=  
       |      | 1200*  
   600 |  720 |  600  
   400 |  480 |  400  
   300 |  360 |  300  
   240 |  288 |  240  
   200 |  240 |  200  
   150 |  180 |  150  

* Highly unlikely to ever be needed or used.

Tonal Range

Despite all the knowledge we now have, knowing the native resolution of a printer is not really enough to choose an appropriate PPI. There is another issue that should be addressed first, and that is one of tonal range. The process of generating a photograph from a vision is one of continual reduction in color range and contrast. The human eye is capable of considerable dynamic range, however the camera is capable of considerably less. Printers are capable of still less, so making the most effective use of your printer’s capabilities is key to producing a high quality, professional print.

The tonal range that may be reproducible by a printer is ultimately determined by the cell size of a pixel. If we take the ever present Epson printer, with its 1440 DPI, we can determine the number of dots per pixel with a simple formula:

(DPI / PPI) * 2 = DPP

If we assume the native resolution, our Epson printer can produce 4 dots per pixel:

(1440/720)*2) = 4

These four dots must produce a square pixel, so in actuality the dots per pixel are arrayed in a 2×2 cell. If we half our ppi, and use 360 instead, we get a 4×4 cell, and at 288ppi we get a 5×5 cell. This simple fact is directly responsible for the ultimate tonal range a printer is capable of, as the number of dots at 720ppi is 1:4 what it is at 360ppi, and 1:6.25 what it is at 288ppi. As we reduce our PPI, we increase the number of colors that may be represented at each individual pixel. At 180ppi, we have theoretically eight times as much tonal range as we do at 720ppi.

If we update our common print resolutions table with cell sizes, we have the following (note, 2400dpi has been normalized with 1200dpi):

      | 1200 | 1440 | 2400  
 =-=-=-=-=-=-=-=-=-=-=-=-=-=  
  2x2 |  600 |  720 |  600  
  3x3 |  400 |  480 |  400  
  4x4 |  300 |  360 |  300  
  5x5 |  240 |  288 |  240  
  6x6 |  200 |  240 |  200  
  8x8 |  150 |  180 |  150  

A 7×7 cell is not evenly divisible, and has been excluded. Given the chart above, it should become clearer why, despite lowering the PPI from say 720 to 360, a print can still look superb. For a close viewing distance of eight inches, we are within the limit of resolving power, and we gain tonal range. Dropping even farther to 288ppi will likely increase tonal range more, without any tangible visible detriment to the vast majority of viewers. The added tonal range at a close viewing distance, however, will likely improve the overall quality of the print for the same majority of users, as the human eye is capable of detecting many millions of colors over an extremely broad range of tones.

Theoretical vs. Actual

Quite often we run into the issue of the theoretical vs. the actual, and usually the actual is less appealing than the theoretical. In the case of Ink Jet printers, the theoretical may actually represent less than the actual capabilities of a printer. In particular, the actual achievable tonal range is often higher than is theoretically derivable via the above formula due to the differences in horizontal vs. vertical DPI. To determine the resolution of a print, you must base your calculations on the lower DPI bound. In the case of a 2880×1440 Epson, this lower bound is 1440. However, because the horizontal DPI is twice as much, you effectively get twice as many dots.

This results in the desirable effect of increasing the possible tonal range at any given resolution. Since our Epson printer has 2880 pixels in the horizontal, at 720ppi we actually have a cell that is 4×2. At 360ppi we have a cell that is 8×4, and at 288ppi we have a cell that is 10×5. Assuming 8 different ink colors, that comes out to a theoretical 401 (400 + 1 extra for pure white…or the absence of ink) possible tones at 288ppi, which is more than enough to produce a tremendously wide range of color. Canon PIXMA Pro printers technically offer even greater range, as their vertical resolution is 2400 rather than 1440, and the horizontal resolution is 4800 rather than 2880. At 240dpi you get a 20×10 size pixel cell, with 9 inks you have 1801 possible tones. A Canon at 300ppi, you have the same tonal range as an Epson at 288ppi. Despite having a lower maximum PPI of 600, Canon printers should produce better tonal range at any given pixel size.

The picture is even more complex, however, as modern professional-grade ink jet printers use not only a variety of ink colors, they also use varying ink droplet sizes. Assuming three different drop sizes (common for Epson and and Canon), theoretically that increases the range of tones to 1203. The realistic effect of varying droplet size is more even tonal grades, rather than considerably more tonal range, however the end result is basically the same: better looking images.

Tonal grading can also be addressed using additional colors – eg CcMmYK which uses Light Magenta and Light Cyan; or even a true Black. Tonal grading also has an impact on image resolution since dot spacing is used to create lighter tones where lighter inks are not available.

Beyond all of this theory there are physical and practical limitations that, once again, take away all the gains our theory has given us. The maximum tonal range that may be achievable is dependent on more than just ink picoliters and mathematics. Paper is a critical factor in determining tonal range, and papers range from soft and warm to stunning bright, from glossy to matte, from smooth to rough. Choosing a paper, however, is a discussion for another day.

Knowledge is power, as they say, or in the case of photography, knowledge is a better vision envisioned. Despite all the rhetoric about printers on the internet, both from manufacturers and avid consumers, a little math and some logic can provide some useful knowledge. If you take anything away from reading this far today, I hope its that resolution is not the most important factor when it comes to creating a stunning print. Viewing distance and tonal range are just as important, if not more important.

As a general rule of thumb, 240-360ppi for your average professional grade ink jet printer will be sufficient for the vast majority of prints viewed within a couple feet. Larger prints framed and hung, viewed at a distance of several feet could do with 200-240ppi. Giant prints viewed at more than a few feet, such as wrapped canvas, can easily do with the bare minimum of 150-180ppi. Using the proper resolution has the benefit of improving tonal range, and will likely reduce your overall ink usage as well.

opengl – Generate vertices of a sphere by using spherical coordinates

I’m trying to generate points for a sphere by subdividing the space of spherical coordinate in res sector and res slices.

At first I did my own implementation, but it wasn’t working. After a while I looked online and I copied Songho implementation and others as well.

But I still have the same issue:
strip made of points

The points are not evenly spaced in the sphere, creating a strip.

This is the code I’m using to generate the sphere:

   float sectorStep = 2 * PI / res;
    float stackStep = PI / res;
    float sectorAngle, stackAngle;
    for(int i = 0; i <= res; ++i){
        stackAngle = PI / 2 - i * stackStep;
        float xy = r * sinf(stackAngle);
        float z = r * cosf(stackAngle);
        for(int j = 0; j <= res; ++j){
            sectorAngle = j * sectorStep;
            float x = xy * sinf(sectorAngle);
            float y = xy * cosf(sectorAngle);
            vertices.push_back(glm::vec3(x,y,z));
        }
    }
    glGenVertexArrays(1, &VAO);
    glGenBuffers(1, &verticesVBO);
    glBindVertexArray(VAO);
    glBindBuffer(GL_ARRAY_BUFFER, verticesVBO);
    glBufferData(GL_ARRAY_BUFFER, vertices.size(), vertices.data(), GL_STATIC_DRAW);
    
    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);
    glEnableVertexAttribArray(0);
    glBindVertexArray(0);

And here it’s how I draw it:

    glm::mat4 projection = glm::perspective(glm::radians(camera.getFOV()), (float) SCR_WIDTH / (float) SCR_HEIGHT, 0.1f, 100.0f);
    glm::mat4 view = camera.getViewMatrix();

    glm::mat4 model = glm::mat4(1.0f);
    shader.use();
    shader.setUniform("projection_view", projection*view);
    shader.setUniform("model", model);
    glBindVertexArray(sphere.VAO);
    glDrawArrays(GL_POINTS, 0, sphere.vertices.size());

I wanted to draw the vertices first and then move to drawing the triangles.

Sorry if this is a stupid question.

password cracking – How To Generate a custom worldlist

I want to generate a wordlist. It’s a bit hard to explain what I want so look at this example character set: 4, 3, 2, 1, 0

I want every string to start with 4 and a bigger number does not succeed a smaller number

for example

(4)
(4 3)
(4 2)
(4 1)
(4 0)
(4 3 2)
(4 3 1)
(4 3 0)
(4 2 1)
(4 2 0)
(4 1 0)
(4 3 2 1)
(4 3 2 0)
(4 3 2 1 0)

❓ASK – How to Generate a Passive Income through Investment? | Proxies-free

Well, making an investment is like a gambling, 50% possibility to earn and 50% possibility to lost. But sometime it turn to 100% lost when you are scam
Let make it 100% gambling but 0% scam
.Let gambling your bitcoin. Invest only 0.1 btc in my internal wallet gambling account and I will give you 0.005 btc daily returns or total of 0.15 Btc montly return on investment . (150%ROI)
I made a lot of withdrawal here only using small amount of capital. 0.001 btc up to 0.005 btc when I have free time. My autopilot mode set up illuminate the risk and it has 80% possibilities to win. With 0.1 capital, I can make make it 99% possibilities and I will make more time to bet.
If you don’t believe me or not trust me, please disregard this post. But if you are interested, just create a private conversations with me through clicking my profile and Start conversation.

How Can Seo Be Used To Generate More Traffic?