Skip to main content
Added in clarifications about the values of neighboring pixels
Source Link
David
  • 191
  • 6

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This means that there would actually be enough different pixel values for a unique value for a 4096x4096. This problem is easy to solve with non continuous colors where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Here is an example of the non-continuous version:

non-continuous map

Each of the individual sub-squares has a different blue value which gives us a unique value. This may be hard to see with the eye, as they are only changing by a very small amount. Using this technique, it is easy to fill up an entire 4096x4096 with unique, mathematically predictable colors.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos. What I mean by this is that each individual neighboring pixels channel value does not change by more than one in value. For instance, a pixel with a red value of 10 may have direct neighbors with a red value of either 9, 10 or 11 The reason for this constraint is that when sampling from this texture, individual neighboring pixels may be sub-sampled and linear interpolated together and when going along the edge of the sub-boxes, this would result in inaccurate values.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one in each channel. Do such functions exist, and if so, what are they?

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This means that there would actually be enough different pixel values for a unique value for a 4096x4096. This problem is easy to solve with non continuous colors where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Here is an example of the non-continuous version:

non-continuous map

Each of the individual sub-squares has a different blue value which gives us a unique value. This may be hard to see with the eye, as they are only changing by a very small amount. Using this technique, it is easy to fill up an entire 4096x4096 with unique, mathematically predictable colors.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos. What I mean by this is that each individual neighboring pixels channel value does not change by more than one. The reason for this constraint is that when sampling from this texture, individual neighboring pixels may be sub-sampled and linear interpolated together and when going along the edge of the sub-boxes, this would result in inaccurate values.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one in each channel. Do such functions exist, and if so, what are they?

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This means that there would actually be enough different pixel values for a unique value for a 4096x4096. This problem is easy to solve with non continuous colors where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Here is an example of the non-continuous version:

non-continuous map

Each of the individual sub-squares has a different blue value which gives us a unique value. This may be hard to see with the eye, as they are only changing by a very small amount. Using this technique, it is easy to fill up an entire 4096x4096 with unique, mathematically predictable colors.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos. What I mean by this is that each individual neighboring pixels channel value does not change by more than one in value. For instance, a pixel with a red value of 10 may have direct neighbors with a red value of either 9, 10 or 11 The reason for this constraint is that when sampling from this texture, individual neighboring pixels may be sub-sampled and linear interpolated together and when going along the edge of the sub-boxes, this would result in inaccurate values.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one in each channel. Do such functions exist, and if so, what are they?

Post Reopened by Ramiro de la Vega, Willie Wong, Stefan Kohl, Felipe Voloch, Carlo Beenakker
edited tags
Link
David
  • 191
  • 6
Clarified the problem and added an example of a "non-continuous" solution
Source Link
David
  • 191
  • 6

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This means that there would actually be enough different pixel values for a unique value for a 4096x4096. This problem is easy to solve with non continuous functionscolors where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Here is an example of the non-continuous version:

non-continuous map

Each of the individual sub-squares has a different blue value which gives us a unique value. This may be hard to see with the eye, as they are only changing by a very small amount. Using this technique, it is easy to fill up an entire 4096x4096 with unique, mathematically predictable colors.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos (I. What I mean by this is that each individual neighboring pixels channel value does not change by more than one) as. The reason for this constraint is that when sampling from this texture, individual neighboring valuespixels may be sub-sampled and linear interpolated together. As this is being used as a lookup table, and when going along the interpolationedge of non continuous valuesthe sub-boxes, this would result in inaccuraciesinaccurate values.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one in each channel. Do such functions exist, and if so, what are they?

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This problem is easy to solve with non continuous functions where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos (I mean that each individual neighboring pixels channel value does not change by more than one) as neighboring values may be interpolated together. As this is being used as a lookup table, the interpolation of non continuous values would result in inaccuracies.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one. Do such functions exist, and if so, what are they?

I need to generate a color map which I am not sure exist. I have a 1024x1024 image which would contain 2^20 pixels. I have 3 color channels which each have 8 bits which would leave us with 2^24 possible colors. This means that there would actually be enough different pixel values for a unique value for a 4096x4096. This problem is easy to solve with non continuous colors where you simply use 4 bits of the final channel on both of the first two channels to create two 12 bit channels.

Here is an example of the non-continuous version:

non-continuous map

Each of the individual sub-squares has a different blue value which gives us a unique value. This may be hard to see with the eye, as they are only changing by a very small amount. Using this technique, it is easy to fill up an entire 4096x4096 with unique, mathematically predictable colors.

Unfortunately, I have a new constraint where all three channels of the map must remain continuos. What I mean by this is that each individual neighboring pixels channel value does not change by more than one. The reason for this constraint is that when sampling from this texture, individual neighboring pixels may be sub-sampled and linear interpolated together and when going along the edge of the sub-boxes, this would result in inaccurate values.

To put it in a slightly different way, I need a function f and f^-1

f(x, y) = r, g, b

f^-1(r, g, b) = x, y (only existing in the original x,y range)

with r, g, b, being 8 bit numbers (the integers 0 - 255) and x and y being 10 bit numbers (the integers 0 - 1023). All neighboring r,g,b values must be continuous. By continuous, I mean that each individual neighboring pixels channel value does not change by more than one in each channel. Do such functions exist, and if so, what are they?

Post Closed as "Needs details or clarity" by Dima Pasechnik, Douglas Zare, Stefan Kohl, Ricardo Andrade, Nik Weaver
added 206 characters in body
Source Link
David
  • 191
  • 6
Loading
added 47 characters in body
Source Link
David
  • 191
  • 6
Loading
Source Link
David
  • 191
  • 6
Loading