how Converting pixel value(5) into bits(00000101)
이전 댓글 표시
for example: i want to convert the pixel value 244 result like a=[1 1 1 1 1 1 1 0].
채택된 답변
추가 답변 (1개)
Asha D L
2020년 6월 9일
0 개 추천
Hi..anyone please help me.. How to use qbits(quantum bits)in an image...i mean how to transfer a bit into qbits..i m going to three qbits like this(000, 001,010,011,100.101,110,111) .how to apply in a gray scale image..how can i change the entire pixels into qbits. please explain.
댓글 수: 6
Walter Roberson
2020년 6월 9일
How many input bits are grouped together in order to produce one group of 3 qbits?
Asha D L
2020년 6월 9일
i m going to take 100*100 pixel size image .. bt i dont know how to grope and al
Walter Roberson
2020년 6월 9일
bits = reshape((dec2bin(YourImage) - '0').', 1, []);
Now arrange bits any way that is appropriate for your software. For example if 2 input bits are used to create one group of 3 qbits, then
lookup_table = [0 0 1; 0 1 0; 1 0 1; 1 1 0];
qbits = reshape( (lookup_table(bits(1:2:end) * 2 + bits(2:2:end) + 1, :)).', 1, []);
Walter Roberson
2020년 6월 9일
I would, however, point out that the largest known quantum computer in the world has only 53 qubits. Computers with 10000 qbits are not expected for many years yet.
Asha D L
2020년 6월 10일
Thank you.. i tried this and all pixel got change..and i got the size of image is 1*120000 double . so when i doing the next process is showing error(Subscript indices must either be real positive integers or logicals). How can i rectify this.
Walter Roberson
2020년 6월 10일
You need to say more about how you want input pixels to be converted to qbits. Do you want each bit to be converted to 3 qbits, so that you your 100 x 100 input image is converted to 100 x 100 x 8 x 3? If so then which triple of qbits should an input 0 bit be converted to? Which triple of qbits should an input 1 bit be converted to?
What you have discussed so far sounds as if you expect to convert each input pixel (of 8 bits) into a single qbit that although being only a single qbit is at the same time all of the values 000 to 111 simultaneously.
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!