Question: Assume the image is only in black and white.

Is there a software that can generate a matrix representation for the text on the image?

Answer: 
PKCS#7 is a cryptography standard published by RSA Security in 1993 that deals with data that has cryptography applied to it. Its a standard for how to package data securely. PKCS#7 references the X.509 standard, as the source for certificate formatting.

X.509 is a wide ranging security standards document published in 1998 which includes amongst other things, certificate file formats.

X.509 specifies that certificates should be encoded using the Distinguished Encoding Rules of the ASN.1 (documented in the X.208 and now X.608) standard, first published in 1984. 

So, DER says how to encode some strings and numeric source data into a binary format,
X.509 says which data needs to go into a digital certificate, and 
PKCS#7 says how that certificate should be used, to digitally sign a message.

---

Privacy Enhanced Mail - some kind of tool released before OpenSSL - needed to pass PKCS#7 "wrapped" data around in email messages that at the time were exchanged on systems that only supported 7 bit ASCII characters - "PEM" created the standard of using Base64 to encoded the X.509 certificates required by PKCS#7, and storing the base64 inside -----BEGIN ???----- -----END ???----- where ??? can be a RSA PRIVATE KEY, PSA PUBLIC KEY, CERTIFICATE etc.
PKCS Components are PKCS#1, PKCS#5, PKCS#7, PKCS#8, PKCS#9, PKCS#10, and PKCS#12, PKCS standards are specifications produced by RSA Laboratories in cooperation with secure-system developers worldwide for the purpose of accelerating the deployment of public-key cryptography.

A user can request a certificate from a Certificate Authority is for that user to send his or her public key in a PKCS#10 object to the CA.Once the request is approved, the CA issues a certificate that is wrapped in a PKCS#7-formatted object.

PKCS#7 defines a standard format for data that has had cryptography applied to it,PKCS#7 specifies only a data format, not the choice of any specific algorithms (X509)

X.509 certificate is a public key packaged with information about the certificate owner and issuer